-
Notifications
You must be signed in to change notification settings - Fork 83
Replace libdparse with dmd as a library in static code analysis #964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Vladiwostok
wants to merge
112
commits into
dlang-community:master
Choose a base branch
from
Vladiwostok:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 109 commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
5479e0d
Update README
RazvanN7 ed81b06
Add dmd-as-a-library submodule (#2)
RazvanN7 0c215ec
Add GH Actions build script (#4)
edi33416 c9d07eb
Removed libdparse from imports print functionality (#3)
lucica28 d5b795c
Fix failing tester + add unittest for imports (#7)
RazvanN7 3ee590b
Add style checker (#9)
edi33416 9255dd7
Update action to build dlang fork
edi33416 d39a9c4
Fix linter errors
edi33416 8cf2cef
Add dmd dependencies to dub.json
edi33416 2ca0abb
Add dmd dependencies to build.bat
edi33416 acf6814
Replace libdparse in enum array functionality
lucica28 500f3b3
replace libdparse in objectconst functionality + unittests integratio…
lucica28 6ae996f
replace libdparse in delete check (#21)
lucica28 ca7d52f
Update dmd (#23)
lucica28 092d89c
Update dmd (#25)
lucica28 02ff102
Fix version flags for gdc and ldc2 (#32)
edi33416 c63616f
replace libparse in final attribute visitor (#34)
lucica28 5ddffd8
update dmd (#37)
lucica28 a3efa88
replace libparse in incorrect infinite range visitor (#33)
lucica28 fd2011e
update dmd (#39)
lucica28 bb16676
replace libdparse in imports sortedness visitor (#35)
lucica28 bf0c847
replace libdparse in redundant attributes visitor (#40)
lucica28 50e992c
replace libdparse in length subtraction visitor (#42)
lucica28 65720ab
replace libdparse in explicitly annotated unittests check (#44)
lucica28 07f97fb
replace libdparse in alias style visitor (#38)
lucica28 172c706
update dmd (#48)
lucica28 010ac1d
replace libdparse in constructor check (#43)
lucica28 a3a5982
replace libdparse in local imports visitor (#45)
lucica28 e6af600
replace libdpase in assert without msg visitor (#50)
lucica28 00eaef9
replace libparse in opequals without tohash visitor (#53)
lucica28 7faa2cb
replace libdparse in auto ref assignment (#51)
lucica28 da10937
replace libdparse in logic precedence visitor (#54)
lucica28 d07ac30
replace libdparse in builtin properties visitor (#52)
lucica28 c6f2134
update dmd (#57)
lucica28 b90a862
replace libdparse in backwards range check (#58)
lucica28 cb432bc
update dmd and include the API needed for semantic analysis (#66)
lucica28 235e9d0
replace libdparse in redundant parens check (#61)
lucica28 60fd082
replace libdparse in statif if else visitor (#56)
lucica28 6a832f4
replace libdparse in useless assert (#63)
lucica28 e88ba52
replace libdparse in exception check (#68)
lucica28 aa2e2d9
replace libdparse in unused label check (#65)
lucica28 593b9c5
delete float operator check (#71)
lucica28 3bd9b5c
replace libdparse in trust_too_much visitor (#70)
lucica28 fdab43b
Add null terminator to string pointers (#77)
Vladiwostok 9250d2d
Replace libdparse in AsmStyleCheck (#75)
Vladiwostok 274d0b3
Use DMD in RedundantStorageClassCheck (#84)
Vladiwostok b60171f
Fix branch after rebase
edi33416 6b00b2e
Fix branch after rebase
edi33416 215faa4
Update dmd submodule reference
edi33416 9b9dae8
Disable parens errors. Needs fixing
edi33416 5a51d79
Disable integration tests due to autofix. Needs fixing
edi33416 75efd94
Update dub.json to latest dmd commit
edi33416 ede1ac2
Fix style errors
edi33416 c93bef3
Update build bat
edi33416 fb27453
Fix GDC build
edi33416 24f7754
Delete DuplicateAttributeCheck (#79)
Vladiwostok 860ddf1
Update dmd to latest version (02d6d07a69280f8cc88380a682717bb67ca485f…
Vladiwostok 8b7612d
Use DMD in NumberStyleCheck (#88)
Vladiwostok 0ac0551
Replace libdparse in IfElseSameCheck (#81)
Vladiwostok 1107667
Use DMD in CyclomaticComplexityCheck (#85)
Vladiwostok 5f3e25f
Replace libdparse with DMD in LabelVarNameCheck (#101)
Vladiwostok ffce051
Delete IfStatementCheck (#106)
Vladiwostok 030481b
Delete CommaExpressionCheck (#104)
Vladiwostok ee4e192
Replace libdparse with DMD in LambdaReturnCheck (#114)
Vladiwostok 7288aea
Replace libdparse with DMD in AlwaysCurlyCheck (#109)
Vladiwostok 232cf54
Replace libdparse with DMD in StyleChecker (#111)
Vladiwostok 511bdce
Replace libdparse with DMD in AutoFunctionChecker (#103)
Vladiwostok cba48fc
Fix github actions for macos (#135)
Vladiwostok c469a9c
Update dmd to latest version (b02f7183804f583776db69c1d8b355671e30621…
Vladiwostok 4268f63
Replace libdparse with DMD in UnusedParameterCheck (#116)
Vladiwostok 38a4c71
Replace libdparse with DMD in UnusedVariableCheck (#119)
Vladiwostok c167ff0
Replace libdparse with DMD in UnmodifiedFinder (#117)
Vladiwostok 8b5bc9f
Replace libdparse with DMD in BodyOnDisabledFuncsCheck (#127)
Vladiwostok 1e3459d
Replace libdparse with DMD in UselessInitializerChecker (#121)
Vladiwostok f95acb4
Replace libdparse with DMD in HasPublicExampleCheck (#130)
Vladiwostok ee6acfb
Replace libdparse with DMD in LineLengthCheck (#134)
Vladiwostok 89f2e1c
Replace libdparse in UnusedResultChecker (#80)
Vladiwostok 531f75b
Fix github actions pipeline (#140)
Vladiwostok c0c881e
Separate analyze with dmd and autofix flows from libdparse analyze fl…
Vladiwostok c90a8f0
Implement autofix flow for dmd as a library and fix autofix for EnumA…
Vladiwostok 4506b01
Update dmd (6f1b331a6a29e3dddc647ec04dfc9cd85064f3e9) (#141)
Vladiwostok 1294a76
Respect "skip unittest" user configuration (#139)
Vladiwostok 8f85263
Update dmd to ef02f08456762548555b1476a6e32c6e6af6320c (#146)
Vladiwostok 0c73765
Fix Autofix for DeleteCheck (#144)
Vladiwostok 78590e6
Replace libdparse with DMD in VcallCtorChecker (#145)
Vladiwostok b5a8ded
Fix Autofix for AlwaysCurlyCheck (#148)
Vladiwostok 686a963
Fix Autofix for ExplicitlyAnnotatedUnittestCheck (#150)
Vladiwostok 517b017
Fix Autofix for AutoFunctionChecker (#149)
Vladiwostok 444f4e2
Fix unittests (#153)
RazvanN7 65253f6
Fail unittests on DMD parsing errors (#154)
Vladiwostok c965cfd
Replace libdparse with DMD in AllManCheck (#125)
Vladiwostok 8e836fc
Respect @nolint user attribute (#158)
Vladiwostok cfe5a5d
Replace libdparse with DMD in MismatchedArgumentCheck (#161)
Vladiwostok bf75a9b
Use rawWrite for writing test files in unit tests (#168)
Vladiwostok 0b2fe2d
Update dmd to 4a90885ef8e0fc29334da91a4318f9ab52af9f80 (#164)
Vladiwostok b308eb4
Remove unused nolint code (#162)
Vladiwostok c276428
Remove unused imports (#166)
Vladiwostok 7e50946
Replace libdparse with DMD in IfConstraintsIndentCheck (#128)
Vladiwostok e1c1a39
Replace libdparse with DMD in UndocumentedDeclarationCheck (#123)
Vladiwostok 6f33134
Fix Autofix for LambdaReturnCheck (#151)
Vladiwostok be19b4a
Replace libdparse with DMD in FunctionAttributeCheck (#156)
Vladiwostok 764b746
Fix Autofix for LengthSubtractionCheck (#169)
Vladiwostok a6ea37c
Fix Autofix for FinalAttributeChecker (#170)
Vladiwostok 76cf434
Fix nolint in StyleChecker (#171)
Vladiwostok 930dd52
Fix Autofix in StaticIfElse (#157)
Vladiwostok 232cd30
Cleanup code and fix integration tests (#172)
Vladiwostok 2bb9689
Fix CI
Vladiwostok 77553e7
Update DMD to 10eb368c1b8c323e1921e991cb2bd8fce535e9b2
Vladiwostok 9665d64
Remove dead code
Vladiwostok c86cb79
Update DMD to a4cbc08f5bc1a2f7ce3289103198c473671e94c0
Vladiwostok 29bbe35
Disable test for DeleteCheck failing due to new compilation warning
Vladiwostok dd8cf5a
[TEMP] Enable debug ssh
Vladiwostok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,9 @@ | |
| # Sublime Text 2 | ||
| *.sublime-workspace | ||
|
|
||
| # Idea stuff | ||
| .idea/ | ||
|
|
||
| # Subversion | ||
| .svn/ | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Avoid checking `enforce` calls as it is phobos specific. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Remove the check for comma expression check | ||
| e.g. (int a = 3, a + 7) | ||
| This check is no longer necessary since comma expression have been removed from the D language. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Remove the check for duplicate attributes (@property, @safe, @trusted, @system, pure, nothrow). | ||
| This check is no longer necessary since having duplicated attributes is now a compiler error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Remove IfStatementCheck, as it has been disabled in 2015 due to false positives and untouched ever since then. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Remove the check regarding structs with no arguments constructors. | ||
|
|
||
| The check is implemented in constructors.d and it warns against the usage | ||
| of both constructors with all parameters with default values and constructors | ||
| without any arguments, as this might be confusing. This scenario, for structs, | ||
| is no longer D valid code and that's why it is being deprecated. | ||
|
|
||
| Let's consider the following code: | ||
|
|
||
| --- | ||
| struct Dog | ||
| { | ||
| this() {} | ||
| this(string name = "doggie") {} // [warn]: This struct constructor can never be called with its default argument. | ||
| } | ||
| --- | ||
|
|
||
| D-Scanner would throw and error for this particular struct, but this code | ||
| does not compile anymore hence this check is not needed anymore/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try:
dlang/dmd@6da6066