Skip to content

Added Super /Mega Linter #19

Added Super /Mega Linter

Added Super /Mega Linter #19

Workflow file for this run

---
name: Linting
on: # yamllint disable-line rule:truthy
# push: null
pull_request: null
permissions: {}
jobs:
Super_Linter:
name: Super Linter
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
- name: Super-linter
uses: super-linter/[email protected] # x-release-please-version
env:
# Linters
VALIDATE_NATURAL_LANGUAGE: true
VALIDATE_MARKDOWN: true
MARKDOWN_CUSTOM_RULE_GLOBS: '**/*.md'
# VALIDATE_RUST_CLIPPY: true # Cant Use as the version is not at 1.81 yet in the linter
VALIDATE_JSON: true
VALIDATE_YAML: true
# Auto Fix the files
# FIX_RUST_CLIPPY: true # Cant Use as the version is not at 1.81 yet in the linter
FIX_MARKDOWN: true
FIX_JSON: true
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Remove this section when Super Linter is updated (https://github.com/dysonltd/tmag5273/issues/3)
Clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Clippy check on src
run: cargo clippy --manifest-path Cargo.toml -- -D warnings
- name: Clippy check on utils
run: cargo clippy --manifest-path utils/Cargo.toml -- -D warnings
- name: Clippy check on esp32 example
run: |
cd examples/esp32-c3
cargo clippy --manifest-path ./Cargo.toml -- -D warnings
# Had to run in the esp32c3 directory to get rid of <https://github.com/taiki-e/portable-atomic/issues/148>
Formatter:
name: Cargo Formatter
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Rustfmt check on src
run: cargo fmt --manifest-path Cargo.toml -- --check
- name: Rustfmt check on utils
run: cargo fmt --manifest-path utils/Cargo.toml -- --check
- name: Rustfmt check on esp32 example
run: cargo fmt --manifest-path examples/esp32-c3/Cargo.toml -- --check