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

CI Tests: check all files for compliance with .editorconfig rules #362

Closed
@shoogle

Description

@shoogle

Picture the following scenario:

  • I run an open source project
  • My project has a.editorconfig file
  • My project has continuous integration tests onTravis CI (or similar)
  • The tests are run every time somebody submits a pull request to my project (and on every commit)

When contributors submit pull requests to my project, I'd like to check all changed files against the rules defined in.editorconfig. (This would be a kind of "sanity check" before the main tests are run.)

  • I want the CI test to fail if somebody submits code that violates the rules in.editorconfig.
  • The test will print a list of files that failed, and why each file failed.
  • The test would inform contributors that they can visithttps://editorconfig.org/ for instructions on how to setup their preferred editor/IDE so that their code will pass the test automatically.

Example output of test program:

./editorconfig-sanity-check: checking code files against rules in .editorconfigREADME.md - Line 17 - trailing whitespace detected (trim_trailing_whitespace = TRUE)docs/index.html - Line 4 - character 33 is invalid (charset = UTF-8)src/module.py - Line 62 - indentation TAB detected (indent_style = SPACE)src/module.py - Line 62 - wrong indent_size detected (indent_size = 4)platform/script.sh - Line 28 - missing final newline (insert_final_newline = true)platform/script.bat - Line 1 - wrong line ending detected (end_of_line = CRLF)For instructions on how to setup your editor/IDE to avoid making these errorsin the future, please see <https://editorconfig.org/>.

As you can see, providing this feature is a win for both maintainers and contributors, and provides a lot of free publicity for EditorConfig!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp