Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

EditorConfig-Action

Actions
Check and/or fix pushed files against .editorconfig style specification
v1.1.1
Latest
Star (46)

EditorConfig-Action

action on GH marketplace  gpg on keybase.io  GitHub release  package.json deps  GitHub

🔎 A GitHub Action to check, enforce & fixEditorConfig style violations

blinking octocatsquar-heartEditorConfig logo

Table of Contents

Table of Contents

What is EditorConfig?

From theEditorConfig website:

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project acrossvarious editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collectionof text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files areeasily readable and they work nicely with version control systems.

Checkout this project's.editorconfig filehere. However, to use this GitHub Action, your projectshould define your own.editorconfig.

This project useseclint by Jed Mao (@jedmao) to lint your project.eclint is alsoreleasedunder an MIT license.

Using EditorConfig-Action with Your Project

Visit theEditorConfig-Action GitHub Marketplace page to get started. Use a tagged release or the masterversion of this GitHub action by creating your own.github/main.workflow file and adding aon = "push" and/oron = "pull_request"workflow thatresolves anactionuses = zbeekman/EditorConfig-Action[@ref].Please see [the GitHub Actions documentation] for additional information.

Example Workflows

Check Conformance of Pushed Commits with.editorconfig

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

workflow"PR Audit" {on="pull_request"resolves=["EC Audit PR"]}action"EC Audit PR" {uses="zbeekman/EditorConfig-Action@v1.1.0"# secrets = ["GITHUB_TOKEN"] # Will be needed for fixing errorsenv={    ALWAYS_LINT_ALL_FILES="false"# This is the default  }}workflow"Push Audit" {on="push"resolves=["EC Audit Push"]}action"EC Audit Push" {uses="zbeekman/EditorConfig-Action@v1.1.0"# secrets = ["GITHUB_TOKEN"] # Will be needed for fixing errorsenv={    EC_FIX_ERROR="false"# not yet implemented    ALWAYS_LINT_ALL_FILES="true"# Might be slow for large repos  }}

If you omit theALWAYS_LINT_ALL_FILES variable or it is set tofalse then only files changed inthe pushed commits will be linted. If you explicitly set this totrue then every file in therepository will be checked. Depending on the size of the repository, this may be a bad idea.

For protected branches, it is best to set the required action to be the one created with theon = "pull_request",e.g.,"EC Audit Push" above, since PRs from forks will not trigger a local push event.

Features and Planed Features

Features currently in development or being considered for addition include:

  • Check only files touched by commits included in the current push
  • Always check all files
  • Pull Request linting (lint all files in pull request) and provide PR status
  • Automatically apply fixes usingeclint fix
  • Ability to pass search patterns togit ls-files for enumerating files to check
  • Ability to override project.editorconfig or use without an.editorconfig viaeclint's property overrideflags
  • Pass patterns of files to ignore

EditorConfig Resources

Other GitHub Actions from@zbeekman


star badge  zbeekman gh profile  zbeekman on twitter

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.1.1
Latest

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.


[8]ページ先頭

©2009-2025 Movatter.jp