Commit Graph

131 Commits

Author SHA1 Message Date
William Ballenthin
e822a8a4d5 linter: warn on nursery rules with no changes needed 2020-07-23 17:31:27 -06:00
William Ballenthin
5197de3dbd lint: better handle rules with no examples
closes #188
2020-07-23 12:09:02 -06:00
William Ballenthin
dc6b61adf3 lint: fix recommendations via templating
closes #189
2020-07-23 11:53:56 -06:00
William Ballenthin
3f55864ce0 lint: ignore period in rule name
closes #190
2020-07-23 11:42:07 -06:00
William Ballenthin
baeea5b6ec *: update license header to reference Apache 2.0
closes #173
2020-07-22 15:05:24 -06:00
Ana María Martínez Gómez
ab1dc3b804 Fix rule linter
Prevent the linter to raise an exception if `examples` is `None`, as it
for example currently happens in:
`capa-rules/nursery/hash-data-using-murmur2.yml`

We could also remove the `examples` tag in those cases, but the linter
shouldn't break in any case.
2020-07-17 14:01:07 +02:00
Ana María Martínez Gómez
07764fb31f Use isort 5
Run `isort --profile black --length-sort --line-width 120 .`

Update documentation as well.
2020-07-16 22:02:53 +02:00
William Ballenthin
3faf175da7 *: add license header
closes #144
2020-07-15 14:14:53 -06:00
William Ballenthin
9fe70dd19c Merge branch 'master' into output-feature-count 2020-07-03 20:49:39 -06:00
Moritz Raabe
9e0d2ffd7b account for Windows paths 2020-07-06 13:00:28 +02:00
William Ballenthin
867de57062 main: find_capabilities: extract feature counts per item, too
closes #95
closes #96
2020-07-03 10:12:03 -06:00
William Ballenthin
1188103d1c pep8: isort 2020-07-02 10:52:05 -06:00
William Ballenthin
c185e9ef09 pep8: black 2020-07-02 10:32:26 -06:00
William Ballenthin
db2b1caeae Merge branch 'master' into fmt-black 2020-07-02 10:25:24 -06:00
Ana María Martínez Gómez
a80f38ec75 Fix get_features rule linter
To support matching namespaces `get_features()` get an extra parameters
which was missing in the rule linter.
2020-07-02 09:24:51 +02:00
William Ballenthin
23e70b4e85 pep8: scripts 2020-07-01 12:42:33 -06:00
Moritz Raabe
cd77aa23db Merge branch 'master' into linter-lib-checks 2020-07-01 09:27:56 +02:00
Moritz Raabe
5cee0d9b80 add lint negative numbers and cleanup tests 2020-06-30 22:17:42 +02:00
William Ballenthin
325aa9574f linter: check that lib rules don't have a namespace
closes #35
2020-06-29 06:16:19 -06:00
William Ballenthin
7a5d2d025f linter: check that lib rules are in lib directory
closes #36
2020-06-29 06:09:18 -06:00
William Ballenthin
9d297e6699 linter: ignore testbed files 2020-06-29 06:09:02 -06:00
William Ballenthin
e3245385c1 linter: use posixpath to normalize slashes 2020-06-28 08:52:30 -06:00
William Ballenthin
21e3b75a3a linter: show expected/found filenames 2020-06-28 08:41:31 -06:00
William Ballenthin
26fef7c615 *: formatting 2020-06-26 18:44:19 -06:00
William Ballenthin
f82e453440 linter: learn to check for unusual meta fields
closes #24
2020-06-26 18:32:17 -06:00
William Ballenthin
8ab91269fa linter: learn to check namespace matches rule path
closes #6
2020-06-26 18:23:47 -06:00
William Ballenthin
22537eb936 linter: learn to check filename to match rule name
closes #7
2020-06-26 18:16:20 -06:00
William Ballenthin
5de0884dd2 main: learn to save off the path to each rule 2020-06-26 18:09:51 -06:00
William Ballenthin
d32c20d140 linter: check for namespace instead of rule-category 2020-06-26 17:53:37 -06:00
William Ballenthin
35faa20e9e linter: check for namespace instead of rule-category 2020-06-26 17:52:32 -06:00
William Ballenthin
add3537447 import source files, forgetting about 938 prior commits 2020-06-18 09:13:19 -06:00