-
Notifications
You must be signed in to change notification settings - Fork 20
add linting via dscanner #88
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
Conversation
Current coverage is
|
|
I don't think dscanner is good enought |
AFAIK it's the best tool out there and we can just disable the warnings that we don't like. |
|
ping me when you would think PR is ready |
134a9a1 to
5599748
Compare
|
@9il I think I am getting somewhere, but for the remaining issues I would like to hear your opinion and help. I do consider static analysis of code important as it can prevent a couple of errors and it ensures that the codes sticks to a style guide - the latter being the main reason for my attempt here. You can run it locally with: Or install the I grouped them after their warning types, so that it's easier to look at them. Naming style guideFrom Phobos: functions + variables in camelCase. Subtracting from
|
source/mir/combinatorics/package.d
Outdated
|
|
||
| /// ditto | ||
| struct IndexedRoR(Collection, Range) | ||
| if (isInputRange!Range) |
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.
this didn't have docs ...
turn off please |
source/mir/ndslice/selection.d
Outdated
|
|
||
| static if (canSave!PureRange) | ||
| auto save() @property | ||
| auto save() |
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.
@property methods with zero arguments should return const.
Changing this as it still can be used via UCFS
|
I would not merge this until the Phobos merged or you remove changes in |
|
Please move all changes to separate PR (and without ndslice) |
|
@9il I tried to describe why I did some of the changes - hope this helps to understand ;-) |
source/mir/combinatorics/package.d
Outdated
| Forward range, which yields the permutations | ||
|
|
||
| See_Also: | ||
| $(LREF Permutations), $(LREF dispose) |
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.
As it is bundled with makePermutations, linking to dispose could be useful to the user
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.
dispose make refer to another dispose
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.
dispose make refer to another dispose
Ehm sry - what do you mean?
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.
you have multiple dispose declarations
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.
So there is no way to link to the "correct" one?
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.
no way
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.
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.
this is not good enough
On 15 апр. 2016 г., at 18:08, Sebastian Wilzbach notifications@github.com wrote:
In source/mir/combinatorics/package.d #88 (comment):
@@ -251,6 +300,9 @@ Params:
Returns:
Forward range, which yields the permutations
+
+See_Also:
$(LREF Permutations), $ (LREF dispose)
I just tested and if I click on dispose it will get to such a page - is this good enough or should we trust that the unittest does the explanation?https://cloud.githubusercontent.com/assets/4370550/14567575/5b2cef92-033d-11e6-8fba-96ccd58c8996.png
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/DlangScience/mir/pull/88/files/21c97a5060d40c21e7e415ee78bab94c461e591f#r59898839
|
Hmm it seems that there were still a lot of stuff to do for the combinatorics module - here's a list of what i changed:
|
allocators should be first argumensts |
Yep those had the allocater as last argument |
a505745 to
b73e74c
Compare
source/mir/combinatorics/package.d
Outdated
|
|
||
| For example $(D"AB".combinations(2).array) returns $(D["AB"]). | ||
| For example `"AB".combinations(2).array` returns `["AB"]`. | ||
|
|
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.
should I remove .array here?
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.
remove this example from the docs. And add constraints, that templates are note accepts narrow strings.
|
@9il CI was failing due to an added tests which included the |
5ec45b5 to
cbf3775
Compare
I created a module level unittest as an overview over the iterators. |
|
(rebased to latest master - as we are moving quite fast tonight) |
why? :( |
Just remove ddox. I don't like vibe.d and ddox ;/ We can use https://github.com/kiith-sa/harbored-mod, it is the best but needs small update. Probably we would need to add macros file from dlang |
Okay will send a PR later ;-) |
Hmm seems that we have to fix libdparse first ... |

I think we should try putting the linting off to a real bot.
This PR adds a execution of dscanner.
We probably want to play with this for a while, maybe disable some checks or fix the codebase until we set the
--enforceflag, which will exit the CI with an error.Currently it outputs many messages, see e.g. here
Other
releases.dlang.io(a s3 bucket to which I will upload such release) - this speeds up the build! Otherwise there is still dub fetch & dub run.