Fix all DScanner warnings + use -return-exit-code re-enable it#6151
Fix all DScanner warnings + use -return-exit-code re-enable it#6151dlang-bot merged 2 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
| static assert(hasDifferentAutodecoding!(T, AliasSeq!(dstring, string))); | ||
| static assert(hasDifferentAutodecoding!(T, AliasSeq!(wstring, dstring))); | ||
| } | ||
| } |
There was a problem hiding this comment.
This was needed to for the "public symbol without undocumented example" check.
There was a problem hiding this comment.
I don't understand. This symbol is not documented and the unit test is not an example.
There was a problem hiding this comment.
The warning was for template substitute. I don't remember which one, but one of the documentation engines used to dislike different symbols (even if they are private) between declaration and unittest. It looks like this has been fixed, so I can look into updating DScanner... though maybe we can live with this workaround until DScanner has been upgraded?
| } | ||
| else static if (isInputRange!Value && !is(CommonType!(ElementType!Value, ElementType!(typeof(substs[0]))) == void)) | ||
| else static if (isInputRange!Value && | ||
| !is(CommonType!(ElementType!Value, ElementType!(typeof(substs[0]))) == void)) |
| else | ||
| { | ||
| static assert(0, "Compile-time substitutions must be elements or ranges of the same type of ` ~ Value.stringof ~ `."); | ||
| static assert(0, `Compile-time substitutions must be elements or ranges of the same type of ` ~ |
std/algorithm/searching.d
Outdated
| return doesThisStart[0] == withThis; | ||
| // specialize for ASCII as to not change previous behavior | ||
| else if (withThis <= 0x7F) | ||
| else static if (withThis <= 0x7F) |
|
|
||
| enum BigInt test1 = BigInt(123); | ||
| enum BigInt test2 = plusTwo(test1); | ||
| assert(test2 == 125); |
There was a problem hiding this comment.
test2 is never used.
| import core.time; | ||
| import std.algorithm.sorting : sort; | ||
| import std.typecons : Rebindable; | ||
| immutable lt = LocalTime().utcToTZ(0); |
There was a problem hiding this comment.
Remove unused imports
| sha512_256.put(cast(ubyte[])""); | ||
| assert(sha512_256.finish() == cast(ubyte[]) hexString!"c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a"); | ||
| assert(sha512_256.finish() == cast(ubyte[]) | ||
| hexString!"c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a"); |
|
|
||
| // Default data timeout for Protocols | ||
| enum _defaultDataTimeout = dur!"minutes"(2); | ||
| private enum _defaultDataTimeout = dur!"minutes"(2); |
There was a problem hiding this comment.
Undocumented public symbol, it's not too late for this one. It has been only added recently: 91eaa508c4
|
|
||
| static foreach (T; AliasSeq!(void, bool, FloatingPointTypeList, /*ImaginaryTypeList, ComplexTypeList,*/ CharTypeList)) | ||
| static foreach (T; AliasSeq!(void, bool, FloatingPointTypeList, | ||
| /*ImaginaryTypeList, ComplexTypeList,*/ CharTypeList)) |
b2b92ed to
7f2c38d
Compare
| dscanner: | $(DSCANNER_DIR)/dsc | ||
| @echo "Running DScanner" | ||
| $(DEBUGGER) -q -ex run -ex bt -batch --args $(DSCANNER_DIR)/dsc --config .dscanner.ini --styleCheck etc std -I. | ||
| $(DEBUGGER) -return-child-result -q -ex run -ex bt -batch --args $(DSCANNER_DIR)/dsc --config .dscanner.ini --styleCheck etc std -I. |
There was a problem hiding this comment.
FYI: DScanner doesn't seem to be super stable, so imho it's better to keep running it within GDB for a while. The overhead isn't too big and we have done so for the last two months.
7f2c38d to
1d1d7c0
Compare
eb7f72e to
901ff6c
Compare
901ff6c to
a2985ed
Compare

tl;dr: DScanner started to segfaulted in December due to the introduction of the AscendingPageAllocator, which used
~this(){}. The DScanner bug has been fixed and now we can fix the DScanner warnings that sneaked in and re-enable in.See also: #6148