Repository navigation
Add linting for shell scripts - #12295
Conversation
|
Heads up! This PR modifies the following files:
|
|
I'd appreciate it if someone took a particularly close look at my changes to |
|
R? @aneeshusa |
| TARGET_DIR="${OUT_DIR}/../../.." | ||
| arm-linux-androideabi-gcc "$@" \ | ||
| "${LDFLAGS}" \ | ||
| -lc \ |
There was a problem hiding this comment.
Let's put the LDFLAGS, lc and shared flags on the same line since they're all linker arguments.
This makes the changes suggested in servo#12295. The python code to lint shell scripts is cleans up generally and some shell scripts are changed to be more readable.
|
No merge commits, please. Use rebase instead. |
fe73796 to
2206ee6
Compare
|
Cool, I've gone ahead and rebased. |
| python components/style/properties/build.py servo html | ||
|
|
||
| OUT_DIR="`pwd`/target/doc/servo" make -f makefile.cargo -C components/script dom_docs | ||
| OUT_DIR="`pwd`/target/doc/servo" \ |
There was a problem hiding this comment.
Can you update this to use $(pwd) per the style guide?
Add linting for shell scripts <!-- Please describe your changes on the following line: --> This changes tidy to check shell scripts for the proper shebang and options. It does not check that variables are formatted correctly. It also adds a check for the MPL 2.0 license in shell scripts. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12158 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295) <!-- Reviewable:end -->
|
💔 Test failed - android |
|
|
||
| TARGET_DIR="${OUT_DIR}/../../.." | ||
| arm-linux-androideabi-gcc "$@" \ | ||
| "${LDFLAGS}" -lc -shared \ |
There was a problem hiding this comment.
LDFLAGS is not always set, so we need to give it a default value if it isn't. A bash parameter expansion should do the trick.
There was a problem hiding this comment.
The default value can just be the empty string.
This changes tidy to check shell scripts for the proper shebang and options. It does not check that variables are formatted correctly. It also adds a check for the MPL 2.0 license in shell scripts.
8800af2 to
7952bd0
Compare
|
@bors-servo r=aneeshusa |
|
📌 Commit 7952bd0 has been approved by |
Add linting for shell scripts <!-- Please describe your changes on the following line: --> This changes tidy to check shell scripts for the proper shebang and options. It does not check that variables are formatted correctly. It also adds a check for the MPL 2.0 license in shell scripts. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12158 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295) <!-- Reviewable:end -->
|
💔 Test failed - android |
|
@bors-servo retry
|
Add linting for shell scripts <!-- Please describe your changes on the following line: --> This changes tidy to check shell scripts for the proper shebang and options. It does not check that variables are formatted correctly. It also adds a check for the MPL 2.0 license in shell scripts. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12158 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295) <!-- Reviewable:end -->
|
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
This changes tidy to check shell scripts for the proper shebang and
options. It does not check that variables are formatted correctly. It
also adds a check for the MPL 2.0 license in shell scripts.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is