Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

EditorConfig-Action

Actions
Check and/or fix pushed files against .editorconfig style specification
v1.0.0
Star (43)

EditorConfig-Action

GitHub Action for checking, enforcing and fixing EditorConfig style constraints

Currently, this project uses eclint by Jed Mao (@jedmao) to lint your project. eclint is also released under an MIT license.

Example Workflows

Check Conformance of Pushed Commits with .editorconfig

To ensure your repository does not violate your project's .editorconfig file, you may use the following workflow:

workflow "EditorConfig Audit" {
  on = "push"
  resolves = ["EditorConfig-Action"]
}

action "EditorConfig-Action" {
  uses = "zbeekman/EditorConfig-Action@v1.0.0"
  # secrets = ["GITHUB_TOKEN"] # Will be needed for fixing errors
  env = {
    EC_FIX_ERROR = "false" # not yet implemented
    ALWAYS_LINT_ALL_FILES = "false" # This is the default
  }
}

If you omit the ALWAYS_LINT_ALL_FILES variable or it is set to false then only files changed in the pushed commits will be linted. If you explicitly set this to true then every file in the repository will be checked. Depending on the size of the repository, this may be a bad idea.

Future Plans

I plan to implement an option to apply EditorConfig fixes automatically in the future. This will require opening a pull request on behalf of the user if the branch is protected, or pushing to an unprotected branch on behalf of the user, if given permission.

EditorConfig-Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check and/or fix pushed files against .editorconfig style specification
v1.0.0

EditorConfig-Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.