-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In detail, this PR - moves the executable bit check into the .yml files, instead of the shell script - adds a `--fix` flag to `lint-style`, for fixing style errors (when possible) - moves calling `lint-style.py` into `lake exe lint-style`, and - switches the CI workflow to call `lake exe lint-style` instead, and removes `lint-style.sh` Ideally, `lint-style.py` will be completely rewritten in Lean soon, so this calling of an external process is only temporary. Helps with #14539.
- Loading branch information
1 parent
cfd6dd5
commit 9dc3664
Showing
9 changed files
with
83 additions
and
77 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 |
---|---|---|
|
@@ -44,6 +44,17 @@ jobs: | |
- name: Look for ignored files | ||
uses: credfeto/[email protected] | ||
|
||
- name: "Check for Lean files with the executable bit set" | ||
shell: bash | ||
run: | | ||
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))" | ||
if [[ -n "$executable_files" ]] | ||
then | ||
echo "ERROR: The following Lean files have the executable bit set." | ||
echo "$executable_files" | ||
exit 1 | ||
fi | ||
- name: install Python | ||
if: ${{ 'bors' == 'ubuntu-latest' }} | ||
uses: actions/setup-python@v5 | ||
|
@@ -57,9 +68,9 @@ jobs: | |
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | ||
- name: "run style linters: Python ones and their Lean rewrite" | ||
- name: "run style linters" | ||
run: | | ||
./scripts/lint-style.sh | ||
lake exe lint-style | ||
- name: Install bibtool | ||
if: ${{ 'bors' == 'ubuntu-latest' }} | ||
|
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 |
---|---|---|
|
@@ -51,6 +51,17 @@ jobs: | |
- name: Look for ignored files | ||
uses: credfeto/[email protected] | ||
|
||
- name: "Check for Lean files with the executable bit set" | ||
shell: bash | ||
run: | | ||
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))" | ||
if [[ -n "$executable_files" ]] | ||
then | ||
echo "ERROR: The following Lean files have the executable bit set." | ||
echo "$executable_files" | ||
exit 1 | ||
fi | ||
- name: install Python | ||
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }} | ||
uses: actions/setup-python@v5 | ||
|
@@ -64,9 +75,9 @@ jobs: | |
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | ||
- name: "run style linters: Python ones and their Lean rewrite" | ||
- name: "run style linters" | ||
run: | | ||
./scripts/lint-style.sh | ||
lake exe lint-style | ||
- name: Install bibtool | ||
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }} | ||
|
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 |
---|---|---|
|
@@ -30,6 +30,17 @@ jobs: | |
- name: Look for ignored files | ||
uses: credfeto/[email protected] | ||
|
||
- name: "Check for Lean files with the executable bit set" | ||
shell: bash | ||
run: | | ||
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))" | ||
if [[ -n "$executable_files" ]] | ||
then | ||
echo "ERROR: The following Lean files have the executable bit set." | ||
echo "$executable_files" | ||
exit 1 | ||
fi | ||
|
||
- name: install Python | ||
if: ${{ 'STYLE_LINT_RUNNER' == 'ubuntu-latest' }} | ||
uses: actions/setup-python@v5 | ||
|
@@ -43,9 +54,9 @@ jobs: | |
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | ||
|
||
- name: "run style linters: Python ones and their Lean rewrite" | ||
- name: "run style linters" | ||
run: | | ||
./scripts/lint-style.sh | ||
lake exe lint-style | ||
|
||
- name: Install bibtool | ||
if: ${{ 'STYLE_LINT_RUNNER' == 'ubuntu-latest' }} | ||
|
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 |
---|---|---|
|
@@ -48,6 +48,17 @@ jobs: | |
- name: Look for ignored files | ||
uses: credfeto/[email protected] | ||
|
||
- name: "Check for Lean files with the executable bit set" | ||
shell: bash | ||
run: | | ||
executable_files="$(find . -name '*.lean' -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \))" | ||
if [[ -n "$executable_files" ]] | ||
then | ||
echo "ERROR: The following Lean files have the executable bit set." | ||
echo "$executable_files" | ||
exit 1 | ||
fi | ||
- name: install Python | ||
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }} | ||
uses: actions/setup-python@v5 | ||
|
@@ -61,9 +72,9 @@ jobs: | |
./elan-init -y --default-toolchain none | ||
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | ||
- name: "run style linters: Python ones and their Lean rewrite" | ||
- name: "run style linters" | ||
run: | | ||
./scripts/lint-style.sh | ||
lake exe lint-style | ||
- name: Install bibtool | ||
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }} | ||
|
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
This file was deleted.
Oops, something went wrong.
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