Martin Trojer
8bdbf3aedc
Fix false positive BAD_POINTER for objcpp
...
Reviewed By: dulmarod
Differential Revision: D8658824
fbshipit-source-id: e582ce8
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
Nikos Gorogiannis
2763d58fa4
[linters] Refactor rule for misuse of NSNumber ptrs.
...
Reviewed By: dulmarod
Differential Revision: D6987684
fbshipit-source-id: d090488
7 years ago
Dulma Churchill
16689e6f22
[linters] Disable DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER because of low fixrate
...
Reviewed By: ddino
Differential Revision: D6373659
fbshipit-source-id: 13ff7c6
7 years ago
Dominic Cooney
c542b65a42
Add a lint rule warning about ObjC custom setters for weak properties
...
Reviewed By: dulmarod
Differential Revision: D6219684
fbshipit-source-id: 586add0
7 years ago
Dulma Churchill
21c7b7dda3
[linters] Do not lint implicit declarations
...
Reviewed By: ddino
Differential Revision: D6009056
fbshipit-source-id: e69f566
7 years ago
Dulma Churchill
4769c481ad
[linters] Add a linter for checking const pointers to Objective-C classes
...
Reviewed By: jvillard
Differential Revision: D5985910
fbshipit-source-id: 9abbb78
7 years ago
Dino Distefano
d694038abd
New test for the tableaux method.
...
Reviewed By: dulmarod
Differential Revision: D5862915
fbshipit-source-id: 6c6c4b6
7 years ago
Dino Distefano
8cad1b5e69
Remove ETX operator from AL
...
Reviewed By: dulmarod
Differential Revision: D5804550
fbshipit-source-id: 24f3b7f
7 years ago
Dulma Churchill
47088e078e
[linters] Use the sdk version by path in the error message of unavailable api check
...
Reviewed By: jvillard
Differential Revision: D5738395
fbshipit-source-id: 4f740a1
7 years ago
Dulma Churchill
30d2822846
[linters] Restrict the remove observer check to when target ios sdk version is greater or equal than 9.0
...
Reviewed By: ddino
Differential Revision: D5670652
fbshipit-source-id: bb26abf
7 years ago
Dulma Churchill
a3309926b3
[linters] Add transition parameter with label for ObjC method declarations or method calls
...
Reviewed By: ddino
Differential Revision: D5652850
fbshipit-source-id: 9174343
7 years ago
Dulma Churchill
3da5908728
[linters] Remove unavailable api class false positives and turn it on
...
Summary:
This is a check for when an unavailable class is being allocated.
This diff also adds a check for the context to remove false positives: If the class is not available but the method calls are wrapped in a check whether the class is available, then don't report.
Reviewed By: jvillard
Differential Revision: D5631191
fbshipit-source-id: 2082dfe
7 years ago
Dulma Churchill
7c384669eb
[linters] Add a new linter UNAVAILABLE_CLASS_IN_SUPPORTED_IOS_SDK for checking unavailable classes in supported ios sdk
...
Reviewed By: akotulski
Differential Revision: D5381931
fbshipit-source-id: 13e36df
7 years ago
Dulma Churchill
3aa68e23d9
[linters] Be able to specify human readable bug type in the rules
...
Reviewed By: jvillard
Differential Revision: D5375731
fbshipit-source-id: 82d5e48
7 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
d4d8db4025
[linters] Adding some missing dots to the suggestion sentences in the default linters.
...
Reviewed By: martinoluca
Differential Revision: D5237144
fbshipit-source-id: f82e75e
8 years ago
Dulma Churchill
57dd45dd82
[linters] Improve the error message in implicit cast error
...
Reviewed By: jvillard
Differential Revision: D5202360
fbshipit-source-id: 78611f1
8 years ago
Dulma Churchill
03bdf0fe2c
[linters] Cast from pointer to integer
...
Reviewed By: jvillard
Differential Revision: D5157470
fbshipit-source-id: 5385b5a
8 years ago
Dulma Churchill
d04a03b8e3
[linters] Remove redundant predicate
...
Reviewed By: ddino
Differential Revision: D5029948
fbshipit-source-id: c549c7e
8 years ago
Dulma Churchill
c9670d215d
[linters] Add new predicate has_type and check for implicit cast
...
Reviewed By: ddino
Differential Revision: D5025959
fbshipit-source-id: de7eb55
8 years ago
Dino Distefano
5bb41cc18c
Removing predicates _strict
...
Reviewed By: dulmarod
Differential Revision: D4863173
fbshipit-source-id: 671ef75
8 years ago
Dino Distefano
7cef8ae3b5
Making AL distinguish class methods from instance methods
...
Reviewed By: dulmarod
Differential Revision: D4826401
fbshipit-source-id: 97c2570
8 years ago
Dino Distefano
40e63aa42c
Added the capability to define macros in AL
...
Reviewed By: dulmarod
Differential Revision: D4721779
fbshipit-source-id: 52da9f0
8 years ago
Martino Luca
a7b947f971
Add support to format reports natively
...
Reviewed By: jvillard
Differential Revision: D4715013
fbshipit-source-id: 8894299
8 years ago
Dino Distefano
df543b900b
Making easier to specify subclassing
...
Reviewed By: dulmarod
Differential Revision: D4699748
fbshipit-source-id: 39f7c05
8 years ago
Dino Distefano
43f3a33c0c
[infer][AL-DSL] Added predicates to query method calls of a certain class (Real Version).
...
Reviewed By: dulmarod
Differential Revision: D4689148
fbshipit-source-id: 97716fd
8 years ago
Nikita Anisimov
096ee4e2a8
[infer][PR] Added 'delegates' string to exclusions in STRONG_DELEGATE_CHECK
...
Summary:
Hi!
It's quite common to have collections of delegates. The collection itself is usually named like "delegatesHash", "delegatesStorage" or simply "delegates". Obviously, there is common part in all these cases, but currently you're excluding property only if it contains "queue".
I've added a simple exclusion by common part. It solved false-positive warnings for me and I think for others it'll be quite helpful too.
Closes https://github.com/facebook/infer/pull/582
Reviewed By: ddino
Differential Revision: D4565221
Pulled By: dulmarod
fbshipit-source-id: c48242e
8 years ago
Dulma Churchill
acce173eb8
[Linters] Move unavailable api check to the linters rule file
...
Reviewed By: ddino
Differential Revision: D4501260
fbshipit-source-id: 77866c3
8 years ago
Dulma Churchill
269ea5ffe5
[linters] Take into account the respondsToSelector block in the unavailable api check
...
Reviewed By: martinoluca
Differential Revision: D4455886
fbshipit-source-id: 58d4d96
8 years ago
Dino Distefano
45cf368ab9
Using checkers defined in linter.al and removed hard-coded checkers.
...
Summary:
This diff allows to use the linters written in DSL to check for bugs.
Now new checkers can be written directly in the DSL.
The diff also remove some weirdness and simplify the CTL semantics.
For example no need to unwrap a node when evaluating the IN operator.
Also no need to distinguish anymore between stmt and decl in the
semantics of EX and EF.
Moreover, the diff de-couple hard-coded checkers (eg checks on component kit)
from those checkers parsed in the .al files.
Reviewed By: martinoluca
Differential Revision: D4375207
fbshipit-source-id: 9ac2d47
8 years ago