Skip to content

Commit

Permalink
🔧 Fix lint errors + add local superlinter
Browse files Browse the repository at this point in the history
  • Loading branch information
evans-g-crsj committed Apr 11, 2023
1 parent 74bba17 commit 139729d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ __pycache__
.gitignore
README.md
run.sh
Jenkinsfile
Jenkinsfile
.mypy_cache/
.dmypy.json
dmypy.json
.vscode
13 changes: 13 additions & 0 deletions scripts/localsuperlinter
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# At the root of the project you can run this command to simulate super linter (you may want to tweak the env vars).
docker run --rm \
-e RUN_LOCAL=true \
-e USE_FIND_ALGORITHM=true \
-e VALIDATE_PYTHON=true \
-e VALIDATE_PYTHON_BLACK=true \
-e VALIDATE_PYTHON_FLAKE=true \
-e IGNORE_GENERATED_FILES=true \
-v /"${PWD}":/tmp/lint \
-w /tmp/lint \
github/super-linter
6 changes: 3 additions & 3 deletions src/copy_member_to_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def main():
"script": {
"lang": "painless",
"source": """
def searchText = [];
def searchText = [];
for (def x : [ctx['firstName'], ctx['lastName'], ctx['institution']]) {
if (x != null && !x.trim().isEmpty() && !searchText.contains(x.toLowerCase())) {
if (x != null && !x.trim().isEmpty() && !searchText.contains(x.toLowerCase())) {
searchText.add(x.toLowerCase())
}
}
ctx['searchText'] = searchText
}
""",
Expand Down

0 comments on commit 139729d

Please sign in to comment.