-
Notifications
You must be signed in to change notification settings - Fork 3k
Add doxygen spellcheck job to Travis #8970
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
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.
Also review travis failures (fixes needed for our doxy)
# | ||
# This rule set is based on Lawrence Phillips original metaphone | ||
# algorithm with modifications made by Michael Kuhn in his | ||
# C implantation, more modifications by Bj�rn Jacke when |
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.
can you fix the character in the name Bjorn ? Line 68 has also some problems
@@ -0,0 +1,121 @@ | |||
#!/bin/bash |
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.
Add at least SPDX specifier here (license missing)
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.
@0xc0170 If this needs a SPDX header, then does .travis.yml as well?
Having this check will be good ! |
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.
Started looking at this, but will get back to it after lunch.
Very nice! I'm not doing a review on this one because I'd like @theotherjimmy to ok the new |
I suspect that our Finland friends might not like this PR. @kegilbert Do you know of any way that this could be made a bit more friendly for their names? |
fi | ||
|
||
while read ln; do | ||
echo "$ln $err" |
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.
Blanket recommendation, but will post here.
Would recommend adding {}
to all variable uses.
Allows for the catching of undefined variables, and exits with a useful error.
echo "$ln $err" | |
echo "${ln} ${err}" |
The linked commit was a change to the license for an aspell dict data file from @melwee01 I believe, it hasn't triggered on names yet in tested directories. The two options for ignoring names would be to manually add them to the exception list, and/or not spell check license headers (which it currently won't unless someone commented them in the doxy format which I believe we don't commonly do). Outside of licenses names shouldn't appear in the comments often I'd imagine. |
The solution I applied isn't the most elegant, but it does match the way the guy spells his name in his email address. That only works for German names, though, as far as I'm aware. |
I've seen it commonly done with umlauts, looks fine to me (was requested by @0xc0170 as well @cmonr due to Github rendering it looks like). @0xc0170 Added the license file (@cmonr had a good point about the Travis file while we touching it here as well). |
2022bfb
to
3d6dc5d
Compare
@AnotherButler @melwee01 Can either of you double check the new whitelist word exceptions/spelling fixes I added in the latest commit? |
3d6dc5d
to
813a128
Compare
Alright, getting this back on track. @kegilbert @bridadan @theotherjimmy My thoughts on the placement of the script. My first thought would be to create and put it into a new directory named My second preference then would be something like |
Fine with me. |
@cmonr Still getting through the vacation catching up funk, which reviews are we waiting? |
Think we're only waiting on someone from docs to give the OK (ping @melwee01 or @AnotherButler), and myself, as I haven't done a deep scrub yet. |
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.
I'm not sure whether the phonetic pages are necessary, but otherwise, I think this looks good 👍
@cmonr Is it normal for the pr-head Travis job to still be at Expected? |
NOTICEThis PR is on hold because an issue in the master branch was found when this was rebased. |
Does this really need to be coming into 5.11.2 ? |
I dont think it should hold 5.11.2 so rather postpone and we focus on remaining jobs |
@adbridge we've been waiting for it for a while; any way to push it? |
@iriark01 Do you actually need it in the release or just getting pushed to master ? |
Currently tests - drivers - platform - rtos - events - features/netsocket
7ebc7b4
to
70b9b75
Compare
Rebased. This should be fine in master, doesn't need to be in the actual release I'd think. |
Just getting pushed to master, please |
OK this can go back into CI once we get all the ones in for 5.11.2 |
starting CI |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Before we integrate, is there an update to docs (we have testing page in the docs, that should describe this check) ? |
Do you mean in the contributing guide, where we say what testing is done on PRs? That's a good idea. |
Yes, found it : https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/reference/contributing/guidelines/ci.md - should be added here |
I'll have to leave that to @kegilbert because I don't actually know what he's done. |
Description
Likely for after the release.
The new job strips doxygen comments out of each header file recursively in the directory passed to the script and runs the text through aspell to provide a list of misspelled words/line number for each file. Misspelled words are counted and compared to the number of instances in just the doxygen comments versus the entire file. If the file contains more instances of the word than just the comments, it is considered a term that was used in the codebase (class name, variable, etc) and is counted as a valid word spelling.
Does not currently spell check comments in code blocks in a doxygen comment, although this would be very possible to add.
After speaking with @bridadan about where to place shell scripts in the tools to run with Travis, we decided on the present location. Please feel free to move it around.
Important files:
If a user encounters a false positive during a new PR, they can add the word to the whitelist to not be counted as invalid (the error message prints a statement explaining this).
The other .dat files that were added come from the default English dictionary data files from aspell. I was not able to discover how to to use the
--local-data-dir
argument in aspell without all of the files present and I needed a slightly modifieden.dat
file. I may be able to replace the defaulten.dat
file during setup instead of including the rest of the files, but this way was easier for people to run the test locally. Up to the maintainers/tools team on what they prefer (there also may be an aspell setting I missed that simplifies this). Let me know your thoughts.NOTE This is expected to fail Travis as there are currently some mispellings in the tested modules. Will update the PR with typo fixes and whitelist additions once the job itself is reviewed.
Sample Job (can probably just look at the one run in this PR as well but ¯\(ツ)/¯)
https://travis-ci.org/kegilbert/mbed-os/jobs/463626330
Currently tests
- drivers
- platform
- rtos
- events
- features/netsocket
@theotherjimmy
@AnotherButler
@cmonr
Pull request type