Giter Site home page Giter Site logo

siddharthab / plugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trunk-io/plugins

0.0 1.0 0.0 10.02 MB

Trunk.io plugins repo

Home Page: https://docs.trunk.io

License: MIT License

Shell 3.16% JavaScript 0.38% Ruby 1.19% C++ 0.32% Python 15.88% Java 2.85% Scala 0.05% Go 0.55% Rust 1.44% Kotlin 1.74% TypeScript 70.31% CSS 0.25% Swift 0.38% Nix 0.07% HCL 0.25% Jupyter Notebook 0.85% Dockerfile 0.02% Haml 0.06% Starlark 0.11% Jinja 0.14%

plugins's Introduction

Welcome

This repository is the official, managed repository for integration actions and linters into trunk. It is imported by default in all trunk configurations.

By consolidating and sharing integrations for linters/actions into a single repository we hope to make the discovery, management and integration of new tools as straight-forward as possible.

Enabling a supported linter

Technology Linters
All codespell, cspell, gitleaks, git-diff-check
Ansible ansible-lint
Bash shellcheck, shfmt
Bazel, Starlark buildifier
C, C++ clang-format, clang-tidy, include-what-you-use, pragma-once
CircleCI Config circleci
Cloudformation cfnlint
CSS, SCSS stylelint
Cue cue-fmt
Docker hadolint
Dotenv dotenv-linter
GitHub actionlint
Go gofmt, golangci-lint, semgrep, goimports
HAML haml-lint
Java google-java-format, semgrep
Javascript eslint, prettier, rome, semgrep
JSON eslint, prettier, semgrep
Kotlin detekt1, ktlint
Kubernetes kube-linter
Markdown markdownlint, remark-lint
Nix nixpkgs-fmt
package.json sort-package-json
PNG oxipng
Protobuf buf (breaking, lint, and format), clang-format, clang-tidy
Python autopep8, bandit, black, flake8, isort, mypy, pylint, semgrep, yapf, ruff
Renovate renovate
Ruby brakeman, rubocop, rufo, semgrep, standardrb
Rust clippy, rustfmt
Scala scalafmt
Security nancy, trivy
SQL sqlfluff, sqlfmt, sql-formatter
SVG svgo
Swift stringslint, swiftlint, swiftformat
Terraform terraform (validate and fmt), tflint2
TOML taplo
Typescript eslint, prettier, rome, semgrep
YAML prettier, semgrep, yamllint

  1. Support for Detekt is under active development; see our docs for more details.
  2. Module inspection, deep checking, and setting variables are not currently supported.

trunk check enable {linter}

Enabling a supported action

action description
buf-gen run buf on .proto file change
commitlint enforce conventional commit message for your local commits
go-mod-tidy automatically tidy go.mod file
go-mod-tidy-vendor automatically tidy and vendor go.mod file
git-blame-ignore-revs automatically configure git to use .git-blame-ignore-revs
trunk actions enable {action}

Read more about how to use plugins here.

Mission

Our goal is to make engineering faster, more efficient and dare we say - more fun. This repository will hopefully allow our community to share ideas on the best tools and best practices/workflows to make everyone's job of building code a little bit easier, a little bit faster and maybe in the process - a little bit more fun.

Additional Reference

Some linters provide built-in formatters or autofix options that don't always produce ideal outputs, especially in conjunction with other formatters. Trunk supports defining autofix options for these linters, but has their formatting turned off by default. An example of this is sqlfluff:

- name: sqlfluff
  files: [sql, sql-j2, dml, ddl]
  runtime: python
  package: sqlfluff
  direct_configs:
    - .sqlfluff
  commands:
    - name: lint
      run: sqlfluff lint ${target} --format json --dialect ansi --nofail
      output: sarif
      success_codes: [0]
      read_output_from: stdout
      parser:
        runtime: python
        run: ${plugin}/linters/sqlfluff/sqlfluff_to_sarif.py
    - name: fix
      run: sqlfluff fix ${target} --dialect ansi --disable-progress-bar --force
      output: rewrite
      formatter: true
      in_place: true
      success_codes: [0]
      enabled: false

The fix subcommand has enabled: false, so when you run trunk check enable sqlfluff, only the lint subcommand is enabled. To override this behavior in your trunk.yaml, specify commands:

lint:
  enabled:
    - sqlfluff:
        commands: [lint, fix]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.