Commit Graph

269 Commits

Author SHA1 Message Date
Alien f9fba3a011 Make splitting of lines for testing agnostic of a specific style. (#546)
Make splitting of lines for testing agnostic of a specific style.
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-02-14 07:57:57 +01:00
The Dlang Bot 3f3028d7f2
Merge pull request #561 from wilzbach/stdx-allocator
Switch to use the frozen stdx-allocator package
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-02-11 20:43:16 +01:00
Sebastian Wilzbach efb0582d2c Switch to use the frozen stdx-allocator 2018-02-11 16:05:07 +01:00
Sebastian Wilzbach 0120aed594 Fix Issue 18409 - DScanner SEGFAULTS on CircleCI 2018-02-09 16:34:03 +01:00
Basile Burg 718d29c02e fix style warnings on itself 2018-01-29 14:26:23 +01:00
Basile Burg 10bf4725c0 update dependencies and adapt to TypeIdentifierPart & DeclaratorIdentList 2018-01-29 12:31:33 +01:00
RazvanN7 df012e9028 Make visiting alias public 2018-01-25 12:52:24 +02:00
The Dlang Bot e9c4587fd5
Merge pull request #495 from wilzbach/assert_without_msg
Add check for asserts without an explanatory message
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-12-16 04:16:24 +01:00
Basile Burg 91dfc8bd4f fixup f48862d7 2017-11-19 15:18:37 +01:00
Basile Burg f48862d7a5 fix #533 - "Could be declared const" should be avoided for declarations with "new" (#534)
fix #533 - "Could be declared const" should be avoided for declarations with "new"
merged-on-behalf-of: Richard Andrew Cattermole <alphaglosined@gmail.com>
2017-11-19 14:37:25 +01:00
WebFreak001 90cc58cdb3 fix #500 2017-11-03 15:40:31 +01:00
Jan Jurzitza 8d53f8887e More null checks (#517)
same as #513, just for a few more constructs. The switch statement already had the same thing in
2017-08-13 19:06:23 +02:00
Jan Jurzitza c98fa77f95 Fix #513 (#514) 2017-08-13 14:14:37 +02:00
Jan Jurzitza 142e284588 foreach missing body crash fix (#515) 2017-08-13 14:14:02 +02:00
Jan Jurzitza 34f893d29f Add a findDeclarationOf overload that takes a callback (#512)
* Add a findDeclarationOf overload that takes a callback
This makes getting the declarations when working with dscanner as a library much easier. Another possible improvement for the future could be directly passing File objects or an input range of Files

* Fix formatting of delegate in findDeclarationOf
2017-08-12 23:14:18 +02:00
Richard Andrew Cattermole 45563536d1 Merge pull request #510 from dlang-community/issue-452
fix #452 - false pos for naming style of a VariableDecl with the "enum" storage class
2017-08-12 01:05:10 +12:00
Jan Jurzitza 0d48f27873 Don't warn about unused identifers named `_` (#511)
Fix #490
2017-08-06 12:30:32 +02:00
Basile Burg 511cee29dc
fix #452 - false pos for namz style for VariableDecl with the "enum" storage class 2017-08-06 02:09:06 +02:00
Basile Burg 55ecfbe479 fix #370 - False positive for duplicate variable name check with structs (#509)
fix #370 - False positive for duplicate variable name check with structs
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2017-08-05 19:10:08 +02:00
Basile Burg e4b0ecc7cf final attrib checker - handle static (#508) 2017-08-04 16:57:16 +02:00
Mark Barbone e7ea632ea4 No longer uses deprecated string.removechars 2017-08-02 15:32:48 -04:00
Jan Jurzitza a916a64fb7 Fix #501 (#502) 2017-07-28 21:05:19 +02:00
Basile Burg 7b91483943 fix #312 - spurious warnings about non-const toString inside const block (#505) 2017-07-28 00:30:03 +02:00
Basile Burg ce6056d4bc fix #275 - cant run tests under windows (#504)
* fix #275 - cant run tests under windows

* fix typo
2017-07-27 16:01:02 +02:00
Basile Burg 7ee23b3d73 fix deprecations messages related to message function (#503)
* fix deprecations messages related to message function

* update dsymbol as a git submodule too
2017-07-27 12:16:52 +02:00
Sebastian Wilzbach 8304e8540c assert_without_msg: Check for std.exception.enforce 2017-07-08 10:20:05 +02:00
Sebastian Wilzbach 5ba4a7bffa Add check for asserts without an explantory message 2017-07-08 03:30:50 +02:00
Sebastian Wilzbach a85393612a Apply selective filtering for has_public_example as well 2017-06-30 04:40:20 +02:00
Sebastian Wilzbach 45ef861268 Fix #457 - Allow to apply checks only for specific modules (#460)
* Fix #457 - Allow to apply checks only for specific modules

* update inifiled to 1.0.2

* Compile dependencies separately, s.t. their unittests don't get executed
2017-06-30 04:31:07 +02:00
Basile Burg f89d356601 Fixes cases of false or non positive with the useless init check (#475)
* fix #474 fix #473 fix #476 - Cases of false and non positive with the useless init check

* do not warn on documented variables

* fix #477 - Custom type initialized to init should not trigger a warn

* allow struct.init when know struct has `@disable` ctor

* fix last false detection in phobos

* prevent check in the "compiles" trait

* - use canFind when filter.empty was negated
- FQN the struct names
- prevent a double query in the canBeInit AA
- import the whole also package
- there was not test on non-initilized variables

* fix, self-linting missed a case that was not yet fixed

* fix more undetected warns during self linting

* use a flag instead of a stack + apply skipTests

* convert spaces to tabs
2017-06-28 08:08:33 +02:00
Sebastian Wilzbach ba751105a2 Merge pull request #470 from dlang-community/has_public_example
Add has_public_example check
2017-06-28 02:22:35 +02:00
The Dlang Bot 38c4d2d0eb Merge pull request #466 from wilzbach/fix-unused_label
Fix AssertError on unknown label in unused_label
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-06-27 22:24:26 +02:00
Sebastian Wilzbach 61d52156aa Run DScanner on itself (#479)
* Enable DScanner checking on Travis
* Fix linter warnings
* Set opequals_tohash_check to disabled
* Set could_be_immutable to 'disabled'
* Split expression back into multiple lines
* Set style to disabled
* Fix Makefile target
2017-06-25 15:05:03 +03:00
Sebastian Wilzbach e065d07573 Add has_public_example check
A check for public declaration without a documented unittest.
2017-06-25 09:30:44 +02:00
Sebastian Wilzbach 36397a579d Fix AssertError on unknown label in unused_label 2017-06-19 22:17:43 +02:00
Sebastian Wilzbach 6df62b7b4d Fix line_length checker for multiLine literals (#465) 2017-06-19 14:21:18 +02:00
Basile Burg db46595870
Revert "set more def bucket count to get better perfs on huge modules (#462)"
This reverts commit d8ee9a3e4b.
2017-06-18 03:08:22 +02:00
Basile Burg d8ee9a3e4b set more def bucket count to get better perfs on huge modules (#462) 2017-06-17 13:57:22 +02:00
Sebastian Wilzbach cf3d702720 Fix deprecations (#458)
* Properly import core.exception in analysis/helpers
* Remove the old std.string.removechars from useless_assert
2017-06-15 14:18:17 +03:00
Sebastian Wilzbach 764921634e Add check for redundant attributes (#441) 2017-06-15 11:15:58 +02:00
Sebastian Wilzbach 18a8b6b15e Merge pull request #455 from dlang-community/issue-454
fix #454 - Ddoc for unions are not detected
2017-06-15 00:16:45 +02:00
Sebastian Wilzbach 345f26465c Allow duplicate braces in allman style (#449) 2017-06-13 15:37:53 +02:00
Basile Burg 596135f596
fix 454 - Ddoc for unions are not detected 2017-06-13 08:45:21 +02:00
Sebastian Wilzbach 09205ddaf9 Add allman check (#446) 2017-06-12 13:33:23 +02:00
Sebastian Wilzbach dab25d5e31 Fix more problems in the sorted import checker (#445)
* Sorted imports: put ConditionalDeclaration and IfStatement in a separate scope

* Allow intermediate imports
2017-06-12 11:26:43 +02:00
Sebastian Wilzbach 6d34b149a9 Fix #422 - False negative: sorted imports with : (#444)
* Fix #422 - False negative: sorted imports with :

* Fix #422: Add another test
2017-06-12 10:29:20 +02:00
Sebastian Wilzbach 6fad779ec2 Fix #439 - Line length false positives in Phobos (#440) 2017-06-12 10:29:00 +02:00
Basile Burg 6e9e841a9a Add a check for useless initializers, close #285 (#429)
* Add a check for useless initializers, close #285

# Conflicts:
#	src/analysis/config.d

* remove duplicated oror condition

* remove useless protection

* also handle several case of assignation to init

* assign to init, forgot to test for ".init"

* update with new configuration initialization
2017-05-17 17:46:10 +02:00
Basile Burg 28945dec81 Merge pull request #428 from BBasile/issue-352
fix #352 - False positive: Parameter is never used, pointers
2017-05-17 14:50:02 +02:00
Basile Burg 40b183aed9 fix #431, Virtual call in ctor - problem with overloaded virtual methods (#432) 2017-05-12 15:25:58 +02:00