-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update sqlfluff * add ruff linter * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix
- Loading branch information
Showing
9 changed files
with
66 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.13-alpine | ||
|
||
RUN apk add --no-cache bash | ||
|
||
WORKDIR /linter | ||
|
||
RUN pip install --target ./lib ruff | ||
ENV PATH=$PATH:/linter/lib/bin | ||
|
||
COPY linter . | ||
COPY ruff.toml . | ||
|
||
CMD ["./linter"] |
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 @@ | ||
from bad1 import NUMBERS |
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 @@ | ||
func ( [1,2,3]) #this line lots PEP8 errors :) |
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,6 @@ | ||
NUMBERS = [ | ||
1, | ||
2 | ||
] | ||
|
||
text = 'some long text some long text some long text some long text some long text some long text' |
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 @@ | ||
extend = "/linter/ruff.toml" | ||
|
||
line-length = 100 |
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,14 @@ | ||
#!/bin/sh | ||
|
||
LINTER_HOME=$(dirname $0) | ||
|
||
RULESET=/usr/src/app/ruff.toml | ||
|
||
if [ -f $RULESET ] | ||
then | ||
CONFIG=$RULESET | ||
else | ||
CONFIG=$LINTER_HOME/ruff.toml | ||
fi | ||
|
||
$LINTER_HOME/lib/bin/ruff check /usr/src/app --config=$CONFIG |
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,14 @@ | ||
line-length = 80 | ||
cache-dir = "/var/tmp/.ruff_cache" | ||
|
||
[lint.per-file-ignores] | ||
# init modules can contain the local imports, logic, unused imports | ||
"__init__.py" = ["F401"] | ||
"test_*.py" = ["E501"] | ||
|
||
[lint] | ||
preview = true | ||
select = ["E", "F", "C90", "W"] | ||
|
||
[lint.mccabe] | ||
max-complexity = 6 |