Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 2.7 KB

check-general-formatting-task.md

File metadata and controls

62 lines (39 loc) · 2.7 KB

"Check General Formatting" workflow (task)

Use editorconfig-checker to check if the formatting of the repository's files matches the .editorconfig.

Installation

Workflow

Install the check-general-formatting-task.yml GitHub Actions workflow to .github/workflows/

Assets

  • .editorconfig
    • Install to: repository root
  • Taskfile.yml - formatting check task.
    • Install to: repository root (or merge into the existing Taskfile.yml).
  • .ecrc - editorconfig-checker configuration file.
    • Install to: repository root

The formatting style defined in .editorconfig is the official standardized style to be used in all Arduino tooling projects and should not be modified.

Configuration

If the repository contains generated or vendored files, they can be excluded from the check by adding them to the Exclude array in the .ecrc configuration file.

Reference: https://github.com/editorconfig-checker/editorconfig-checker#configuration

Readme badge

Markdown badge:

[![Check General Formatting status](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/check-general-formatting-task.yml/badge.svg)](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/check-general-formatting-task.yml)

Replace the TODO_REPO_OWNER and TODO_REPO_NAME placeholders in the URLs with the final repository owner and name (example).


Asciidoc badge:

image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-general-formatting-task.yml/badge.svg["Check General Formatting status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-general-formatting-task.yml"]

Define the {repository-owner} and {repository-name} attributes and use them throughout the readme (example).

Commit message

Add CI workflow to check general file formatting

On every push, pull request, and periodically, check whether the repository's files are formatted according to
.editorconfig.

PR message

On every push, pull request, and periodically, use [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) check whether the repository's files are formatted according to [`.editorconfig`](https://editorconfig.org/).