Skip to content

Commit

Permalink
[Feat] add code style checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mistricky committed Feb 12, 2024
1 parent 6e94046 commit adfd940
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ jobs:
- name: Install commit message convention lib
run: npm i commitlint-config-wizardoc -D

- name: Check lint name convention
- name: Check commit message
uses: wagoid/commitlint-github-action@v4

- name: Check code style
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
10 changes: 10 additions & 0 deletions stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "Always"
collapse_simple_statement = "Never"

[sort_requires]
enabled = false

0 comments on commit adfd940

Please sign in to comment.