Dino Distefano
2f3b376996
Added is_optional_objc_method predicate
...
Reviewed By: martintrojer
Differential Revision: D15468063
fbshipit-source-id: d3525082a
6 years ago
Dino Distefano
10ca0c3269
Fix detection of return type for instancetype when using NS_ASSUME_NONNUL
...
Reviewed By: jvillard
Differential Revision: D15317686
fbshipit-source-id: a13520499
6 years ago
Dino Distefano
4f982e9f63
Add predicate for Unavailable attr
...
Reviewed By: d16r
Differential Revision: D15198762
fbshipit-source-id: 88e8603d1
6 years ago
Dino Distefano
df438016f2
Adding SourceExp transition to AL
...
Reviewed By: martintrojer
Differential Revision: D15181376
fbshipit-source-id: f235a1375
6 years ago
David Lively
5d4a27ea54
RFC: stop using _ to separate ObjC/C++ class name from method in Typ.Procname.to_string
...
Reviewed By: jvillard
Differential Revision: D14736442
fbshipit-source-id: 500df354b
6 years ago
Ezgi Çiçek
274570f499
[objc] Fix test results for linters
...
Reviewed By: ngorogiannis
Differential Revision: D14279721
fbshipit-source-id: 95838158d
6 years ago
Dino Distefano
aae5192b79
fix vardecl const
...
Summary:
the predicate to check that a decl is const was not working for VarDecl.
This diff fixes this
Reviewed By: jvillard
Differential Revision: D14106798
fbshipit-source-id: 1f6c24113
6 years ago
Jules Villard
a29e769b61
[kill -a][1/4] stop using `-a foo` in the infer repo
...
Summary:
Goal of the stack: deprecate the `--analyzer` option in favour of turning
individual features on and off. This option is a mess: some of the options are
now subcommands (compile, capture), others are aliases (infer and checkers),
and they can all be replicated using some straightforward combination of other
options.
This diff: stop using `--analyzer` in tests. It's mostly `checkers` everywhere,
which is already the default. `linters` becomes `--no-capture --linters-only`.
`infer` is supposed to be `checkers` already. `crashcontext` is
`--crashcontext-only`.
Reviewed By: mbouaziz
Differential Revision: D9942689
fbshipit-source-id: 048281761
6 years ago
Martin Trojer
e2c08e4085
Decouple objc tests from xcode-select
...
Reviewed By: jvillard
Differential Revision: D9359621
fbshipit-source-id: e490dac4a
6 years ago
Jules Villard
30c470eb48
[tests] record error bucket in expected output
...
Summary:
It's useful to test that the bucket a given error is classified as doesn't
change over time without notice.
This records the bucket for *all* the tests, even though some never produce a
bucket. This is to be on the safe size instead of risking to forget adding the
bucket information when the test changes, or when copy/pasting from a test that
doesn't have buckets to one that does.
The implementation is pretty crude: it greps the beginning of the qualifier
string for a `[bucket]`.
Reviewed By: mbouaziz
Differential Revision: D8236393
fbshipit-source-id: b3b1eb9
7 years ago
Jules Villard
8b882ac1df
Change license to MIT
...
Summary:
Change the license of the source code from BSD + PATENTS to MIT.
Change `checkCopyright` to reflect the new license and learn some new file
types.
Generated with:
```
git grep BSD | xargs -n 1 ./scripts/checkCopyright -i
```
Reviewed By: jeremydubreil, mbouaziz, jberdine
Differential Revision: D8071249
fbshipit-source-id: 97ca23a
7 years ago
Brandon Kieft
eab7fd1242
Add predicates to check the receiver class type
...
Reviewed By: dulmarod
Differential Revision: D7888339
fbshipit-source-id: ecedc82
7 years ago
Brandon Kieft
cb66e4212b
Add predicates for instance and class methods
...
Reviewed By: dulmarod
Differential Revision: D7875528
fbshipit-source-id: dce8360
7 years ago
Brandon Kieft
275f4c3a8c
Add predicates to check for protocols
...
Reviewed By: dulmarod
Differential Revision: D7867975
fbshipit-source-id: 20d599d
7 years ago
Brandon Kieft
439839a9fa
Add is_in_(interface/implementation) predicates
...
Reviewed By: dulmarod
Differential Revision: D7863886
fbshipit-source-id: d8268d9
7 years ago
Brandon Kieft
7d4bd403df
Add is_objc_method_exposed predicate
...
Reviewed By: dulmarod
Differential Revision: D7862233
fbshipit-source-id: da2ee1b
7 years ago
Brandon Kieft
01ee635902
Add is_objc_method_overriding predicate
...
Reviewed By: dulmarod
Differential Revision: D7859827
fbshipit-source-id: 14c58d2
7 years ago
Brandon Kieft
d7cf002461
Add new ObjC predicates, mostly related to categories
...
Reviewed By: dulmarod
Differential Revision: D7809653
fbshipit-source-id: c21f721
7 years ago
Jeremy Dubreil
d74f189dfe
[infer] add the report kind to the list of expected output
...
Reviewed By: dulmarod
Differential Revision: D7209545
fbshipit-source-id: aab32f3
7 years ago
Jules Villard
337fb9bcdd
[al] import files relatively to the current al file
...
Summary:
Previously imports with relative filenames would not get resolved so the result
would depend on where infer had been run from. Usually this was the project
root. Now, resolve path names of imports relative to the file doing the
`#IMPORT`. This changes behaviour most of the time.
Reviewed By: dulmarod
Differential Revision: D6784740
fbshipit-source-id: 4ccb7bf
7 years ago
Jules Villard
6d908adf14
[al] use "quotes" for user imports
...
Summary:
This changes the syntax for AL imports from `#IMPORT <file>` to `#IMPORT
"file"`. As a side-effect, the `file` part is now lex'd more permissively too.
Reviewed By: dulmarod
Differential Revision: D6784669
fbshipit-source-id: cc1bb73
7 years ago
Dulma Churchill
a1010fb9fc
[linters] Ading predicate is_in_objc_class_named and make a verbose rule more targeted
...
Reviewed By: ddino
Differential Revision: D6323539
fbshipit-source-id: 5681c95
7 years ago
Vivek Dhiman
d8be5e0874
Added 'is_method_called_by_superclass'. A new predicate that checks if the caller name is super class in a 'method call'.
...
Reviewed By: dulmarod
Differential Revision: D6311990
fbshipit-source-id: 5c9919c
7 years ago
Dulma Churchill
18782be7c9
[linters] Adding a new predicate for in an ObjC class that is subclass of some class
...
Reviewed By: ddino
Differential Revision: D6284441
fbshipit-source-id: bcdd389
7 years ago
Dulma Churchill
2f8b749045
[objc] Better names for the block translation and using temp variables
...
Reviewed By: sblackshear
Differential Revision: D6125704
fbshipit-source-id: 7b6aefc
7 years ago
Dulma Churchill
652af47da7
[linters] Add transition to parameters by position in the parameters list
...
Reviewed By: ddino
Differential Revision: D5911586
fbshipit-source-id: 263b7dc
7 years ago
Jules Villard
72b1ac4b5a
Turn off --keep-going by default
...
Summary: Ignoring failures shouldn't be the default.
Reviewed By: jeremydubreil
Differential Revision: D5832949
fbshipit-source-id: d96024d
7 years ago
Dino Distefano
f3b158a158
Fix use of SEL in AL
...
Reviewed By: jberdine
Differential Revision: D5847272
fbshipit-source-id: 08591aa
7 years ago
Dulma Churchill
d8765d1d44
[linters] Include only base name of ObjC methods in the linters bug hash
...
Reviewed By: ddino
Differential Revision: D5815441
fbshipit-source-id: 059ff8d
7 years ago
Dulma Churchill
7e3298711c
[AL] Compute a witness child node when computing formulas to be used for more precise bug hashing
...
Reviewed By: ddino
Differential Revision: D5767064
fbshipit-source-id: bff07cf
7 years ago
Roy Li
76bc7d686c
Add predicate for enum constants of a particular enum
...
Reviewed By: dulmarod
Differential Revision: D5637214
fbshipit-source-id: dccc65e
7 years ago
Dulma Churchill
a6f8850617
[linters] Provide predicate for checking the current method in the context
...
Reviewed By: ddino
Differential Revision: D5658198
fbshipit-source-id: ed9ce7f
7 years ago
Meng Zhang
cdc54563d4
[Infer] Write a has_visibility_attribute predicate for AL
...
Reviewed By: dulmarod
Differential Revision: D5575154
fbshipit-source-id: 677a7af
7 years ago
Jeremy Dubreil
bf11a27158
[infer] merge --failures-allowed and --keep-going
...
Summary: The `--failures-allowed` was doing for the Clang frontend what `--keep-doing` was doing for the backend. This revision merges the two options to simplify the Infer CLI and our tests.
Reviewed By: jvillard
Differential Revision: D5474347
fbshipit-source-id: 09bcea4
7 years ago
Jeremy Dubreil
ff30afac8b
[infer][al] fix the linters test output
...
Reviewed By: sblackshear
Differential Revision: D5493869
fbshipit-source-id: cc48374
7 years ago
Dino Distefano
a386ef5e83
Adding predicate for identify a selector with a particular name
...
Reviewed By: jvillard
Differential Revision: D5489581
fbshipit-source-id: edcb82e
7 years ago
Dulma Churchill
416478d453
[linters] Predicate for checking enum constants
...
Reviewed By: akotulski
Differential Revision: D5423574
fbshipit-source-id: c1deb13
8 years ago
Dulma Churchill
431b5c6ede
[linters] Disable filtering by path in debug or no-filtering mode
...
Reviewed By: ryanrhee
Differential Revision: D5369250
fbshipit-source-id: 88e5289
8 years ago
Dino Distefano
4a5d0e0b55
Adding ability to express properties on the hierachy of protocols
...
Reviewed By: dulmarod
Differential Revision: D5227505
fbshipit-source-id: f4f9774
8 years ago
Dulma Churchill
7d680b3b0c
[linters] Add an optional doc_url field to linters to specify the url to some documentation online.
...
Reviewed By: jvillard
Differential Revision: D5301979
fbshipit-source-id: b3ab268
8 years ago
Dulma Churchill
47f1c6ffac
[linters] Global paths
...
Reviewed By: ddino
Differential Revision: D5228481
fbshipit-source-id: ab8b542
8 years ago
Dulma Churchill
dfca0cdcf7
[linters] Introduce whitelist and blacklist path, also multiple paths
...
Reviewed By: ddino
Differential Revision: D5209648
fbshipit-source-id: dbb77c2
8 years ago
Don Stewart
35ac57c378
Typo in message.
...
Reviewed By: dulmarod
Differential Revision: D5217194
fbshipit-source-id: 1b3a039
8 years ago
Dino Distefano
55da0055c9
Predicate for `using namespace`
...
Reviewed By: dulmarod
Differential Revision: D5172430
fbshipit-source-id: 0cd9251
8 years ago
Dino Distefano
0809279b3b
Extending type parser to deal with typedefs
...
Reviewed By: dulmarod
Differential Revision: D5155322
fbshipit-source-id: 9af8d8b
8 years ago
Dulma Churchill
46a539df82
[linters] Specify path in linters
...
Reviewed By: jvillard
Differential Revision: D5146904
fbshipit-source-id: 62b9d78
8 years ago
Dulma Churchill
f5d3870485
[linters] Adding a new error type like
...
Reviewed By: martinoluca
Differential Revision: D5111078
fbshipit-source-id: 06e14b8
8 years ago
Dino Distefano
4e7c7f30c1
Extended transitions to universal quantified operators
...
Reviewed By: dulmarod
Differential Revision: D5094722
fbshipit-source-id: a20e96b
8 years ago
Dino Distefano
e77ca182a5
Added a lint for namespace
...
Reviewed By: dulmarod
Differential Revision: D5103566
fbshipit-source-id: 4092e73
8 years ago
Dino Distefano
bdd2395be6
Adding ability to get type of paramters.
...
Reviewed By: dulmarod
Differential Revision: D5069844
fbshipit-source-id: c591f76
8 years ago