-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] add linting and autoformatting for shell scripts (#227)
- Loading branch information
Showing
10 changed files
with
206 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# failure is a natural part of life | ||
set -e | ||
set -e -u -o pipefail | ||
|
||
if [[ "$TASK" == "rpkg" ]]; then | ||
R CMD INSTALL \ | ||
--clean \ | ||
$(pwd)/r-pkg | ||
R CMD INSTALL \ | ||
--clean \ | ||
./r-pkg | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# failure is a natural part of life | ||
set -e | ||
set -e -u -o pipefail | ||
|
||
if [[ "$TASK" == "rpkg" ]]; then | ||
Rscript .ci/lint_r_code.R $(pwd) | ||
R CMD build $(pwd)/r-pkg | ||
export _R_CHECK_CRAN_INCOMING_=false | ||
R CMD check \ | ||
--as-cran \ | ||
*.tar.gz | ||
Rscript .ci/lint_r_code.R "$(pwd)" | ||
R CMD build ./r-pkg | ||
export _R_CHECK_CRAN_INCOMING_=false | ||
R CMD check \ | ||
--as-cran \ | ||
./*.tar.gz | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
exclude: | | ||
(?x)^( | ||
test-data/.* | ||
)$ | ||
repos: | ||
- repo: https://github.com/maxwinterstein/shfmt-py | ||
rev: v3.7.0.1 | ||
hooks: | ||
- id: shfmt | ||
args: ["--indent=4", "--space-redirects", "--write"] | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.10.0.1 | ||
hooks: | ||
- id: shellcheck | ||
args: ["--exclude=SC2002"] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
# additional_dependencies: [tomli] | ||
# args: ["--toml", "pyproject.toml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -e -u -o pipefail | ||
|
||
# Remove testing directory | ||
echo "removing testing directory" | ||
rm -r $(pwd)/sandbox | ||
rm -r ./sandbox | ||
|
||
# Kill the running container | ||
echo "killing running container" | ||
docker kill $(docker ps -ql) | ||
docker kill "$(docker ps -ql)" | ||
|
||
echo "done cleaning up test environment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* One NOTE from `checking CRAN incoming feasibility ...` can be safely ignored since it's a note that notifies CRAN that this is a new maintainer/submission. | ||
|
||
### CRAN Response | ||
* Automatic checking upon CRAN submission yielded two notes. One was the "incoming feasbility..." item we mentioned above, which is not an issue. | ||
* Automatic checking upon CRAN submission yielded two notes. One was the "incoming feasibility..." item we mentioned above, which is not an issue. | ||
* The other note said that `Author field differs from that derived from Authors@R`. This did not arise when running `R CMD check --as-cran` locally, but it looks like "fnd" is not a supported tag for an author. Removed that tag. | ||
|
||
## v0.0.2 - Submission 2 - (July 17, 2017) | ||
|
@@ -127,7 +127,7 @@ In this submission, we changed maintainer from `[email protected]` to `jayla | |
## v0.4.0 - Submission 1 - (September 11, 2019) | ||
|
||
### `R CMD check` results | ||
* No isses | ||
* No issues | ||
|
||
### CRAN Response | ||
* No issues. v0.4.0 released to CRAN! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.