Skip to content

Commit

Permalink
Merge pull request #3 from Princeton-LSI-ResearchComputing/setup_linting
Browse files Browse the repository at this point in the history
Configure GitHub Actions to run Super-Linter
  • Loading branch information
lparsons committed Feb 23, 2021
2 parents 87bbc36 + 18ea296 commit 72deb00
Show file tree
Hide file tree
Showing 24 changed files with 733 additions and 79 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 120
ignore =
E231 # There should be whitespace after the characters ,, ;, and :. black; fixed in black 20 (https://github.com/psf/black/issues/1289)
26 changes: 26 additions & 0 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Super-Linter

# Run this workflow every time a new commit is pushed to your repository
on: push

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
super-lint:
# Name the Job
name: Lint code base
# Set the type of machine to run on
runs-on: ubuntu-latest

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2

# Runs the Super-Linter action
- name: Run Super-Linter
uses: github/super-linter@v3
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
11 changes: 11 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[settings]
profile=

; vertical hanging indent mode also used in black configuration
multi_line_output = 3

; necessary because black expects the trailing comma
include_trailing_comma = true

; include our Django apps as first part
known_first_party = TraceBase,DataRepo
35 changes: 35 additions & 0 deletions .markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
###########################
###########################
## Markdown Linter rules ##
###########################
###########################

# Linter rules doc:
# - https://github.com/DavidAnson/markdownlint
#
# Note:
# To comment out a single error:
# <!-- markdownlint-disable -->
# any violations you want
# <!-- markdownlint-restore -->
#

###############
# Rules by id #
###############
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
MD013:
line_length: 400 # Line length 80 is far too short
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
1 change: 1 addition & 0 deletions .pylintrc
Empty file added .python-black
Empty file.

0 comments on commit 72deb00

Please sign in to comment.