-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linters for python, markdown (#177)
* Add linters for - python - markdown Reason: Improve code quality * Feat/linter with external flavors and formatting fixes (#186) * Read mand flavors from SCS-Spec.MandatoryFlavors.yaml. This implements #235. * Be consistent about using f-strings * Doc strings, f strings, line-length. * Extra braces, one more f-string. * flavor-name-check.py passing flake8 except E226, E501 * flake8 also for flave-names-openstack.py. Also fix error introduced in Prop parser (when we exhaust the list). * Use flake8 settings of my liking. * Fix flake8 complaints (not enough blank lines) * Fix flake8 complaints and *some* pylint suggestions. * Use f-strings for formatting to please pylint. Well, it also pleases my own eyes :-) * Resolve merge errors. Signed-off-by: Tim Beermann <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Co-authored-by: Kurt Garloff <[email protected]>
- Loading branch information
Showing
7 changed files
with
296 additions
and
189 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
ignore = E501, E251, E226, E221 | ||
|
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,18 @@ | ||
--- | ||
name: Check markdown syntax | ||
|
||
"on": | ||
push: | ||
paths: | ||
- '**.md' | ||
- .github/workflows/lint-markdown.yml | ||
|
||
jobs: | ||
lint-markdown-syntax: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: reviewdog/action-markdownlint@v0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-check |
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,19 @@ | ||
--- | ||
name: Check python syntax | ||
|
||
"on": | ||
push: | ||
paths: | ||
- '**.py' | ||
- .github/workflows/lint-python.yml | ||
|
||
jobs: | ||
lint-python-syntax: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: pip3 install flake8 | ||
- run: flake8 |
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.