-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add MegaLinter #19
Add MegaLinter #19
Conversation
I kept the shell script reformatting in separate commits from the changes (for now). |
@sierrafoxtrot Please have a look at the questions above. If you tell me your preference, I can make this PR ready for merge. |
Curious about this one. We don't have any JSON or JS from memory. Does this cover something I'm forgetting? |
The new cSpell configuration is currently a JSON file. |
I understand. This work is a huge leap forward Josef so happy to keep it as-is if that is the simplest way forward. |
A little polishing done here and there since the first push. The major ones are:
From my side this PR is ready now. |
Rebase to solve conflicts. |
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.
Thanks Josef, this is a huge improvement and significantly cleans things up. One query above but I'm keen to get this merged.
# Order of preprocessors may be important | ||
-t # Preprocess with tbl | ||
-s # Preprocess with soelim, with search paths: | ||
-I ${DocSourcePath} |
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.
Adding new and moving existing options shouldn't be mixed with style changes.
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.
Yes that's true. I tried to kept the numbers of commits low for Scott ;-)
-man # Macro Package man | ||
# Order of preprocessors may be important | ||
-t # Preprocess with tbl | ||
-s # Preprocess with soelim, with search paths: |
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 write the order may be important, but swap it here in this commit which is mostly about style changes.
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 don't know groff, and found no hint about this behavior in the options description in the man page.
But checking the output for being identical I recognized that the order of -P-I${image_stem_name}
had an influence on the filename of the generated png.
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 did now normalize the order of all groff calls. They order in general seems to be irrelevant, just that one is not.
I left the comment in the code, so the people are aware to be sure to check the output files if those things are changed.
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.
Yep, the ordering is important except when it isn't :-(. Adding the image stem option was fiddly. Needed to give unique website images but also to support concurrent doc builds (there was a race condition around generating an image for one doc entry being overwritten by another running in parallel). The other main gotchas I encountered were around the args being passed to the preprocesors like soelim and tbl.
Add initial configuration with some checks disabled to be non-blocking: CPP_CPPLINT: Necessary code changes need to be reviewed in detail. HTML_DJLINT and HTML_HTMLHINT: The HTML files are preprocessed and contain some control commands. They cannot checked as is.
cSpell is used in Code and and can be checked on command line. It's also included in the MegaLinter workflow.
Although a valid alternative, nibble is more commonly used and the majority of the code uses nibble already.
- Avoid copying it to build dir - Apply executable flags to all shell scripts. - Auto-format by `shfmt -p -i 4 -sr -fn -w *`
- Fixed problems reported by `shellcheck`. - Apply executable flags to all shell scripts. - Auto-format shell scripts by `shfmt -p -i 4 -sr -fn -w *`.
- Avoid too long lines - Add comments for some command line arguments - Avoid local variables with `CMAKE` prefix - Fix dependencies to scripts - Move forgotten awk script from `etc` to `script`
Synchronize the order of arguments for the different `groff` calls without changing the output. This shall make the real differences more obvious. Add an explicit `-s` which is implicitly activated by `-I`. Specify options `-T` and `-man` first, do preprocessing in order: `-t`, `-s`, `-P`. At least `-P-I${image_stem_name}` must be done last, otherwise the generated file names uses a default instead of the given stem.
|
Adds a GitHub workflow for MegaLinter with initial configuration and some fixed.
Successful linters:
Switched to be non-blocking: