From b6ccfd4ef5732fe092bbebe299066f872cf5fd5e Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 11 May 2014 20:22:57 -0700 Subject: [PATCH] Add some example .arclint files to un-lie the pending documentation Summary: Ref T2039. Provide some examples to help users figure out how to write these things. Test Plan: Checked them with `jsonlint`. Reviewers: btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T2039 Differential Revision: https://secure.phabricator.com/D9065 --- resources/arclint/cornucopia.arclint.example | 52 +++++++++++++++++++ .../arclint/general-purpose.arclint.example | 22 ++++++++ .../arclint/include-exclude.arclint.example | 13 +++++ 3 files changed, 87 insertions(+) create mode 100644 resources/arclint/cornucopia.arclint.example create mode 100644 resources/arclint/general-purpose.arclint.example create mode 100644 resources/arclint/include-exclude.arclint.example diff --git a/resources/arclint/cornucopia.arclint.example b/resources/arclint/cornucopia.arclint.example new file mode 100644 index 00000000..b1771ec1 --- /dev/null +++ b/resources/arclint/cornucopia.arclint.example @@ -0,0 +1,52 @@ +{ + "linters": { + "pep8": { + "type": "pep8", + "include": "(\\.py$)", + "exclude": "(^exclude.py)", + "severity": { + "E401": "warning" + } + }, + "flake8": { + "type": "flake8", + "include": "(\\.py$)", + "exclude": "(^exclude\\.py)", + "severity": { + "E901": "advice" + } + }, + "csslint": { + "type": "csslint", + "include": "(\\.css$)" + }, + "text": { + "type": "text", + "include": "(\\.txt$)" + }, + "ruby": { + "type": "ruby", + "include": "(\\.rb$)" + }, + "filename": { + "type": "filename" + }, + "spelling": { + "type": "spelling" + }, + "nolint": { + "type": "nolint" + }, + "generated": { + "type": "generated" + }, + "phpcs": { + "type": "phpcs", + "include": "(\\.php)", + "severity.rules": { + "(^PHPCS\\.E\\.)": "warning", + "(^PHPCS\\.W\\.)": "advice" + } + } + } +} diff --git a/resources/arclint/general-purpose.arclint.example b/resources/arclint/general-purpose.arclint.example new file mode 100644 index 00000000..58391089 --- /dev/null +++ b/resources/arclint/general-purpose.arclint.example @@ -0,0 +1,22 @@ +{ + "linters": { + "filename": { + "type": "filename" + }, + "generated": { + "type": "generated" + }, + "merge-conflict": { + "type": "merge-conflict" + }, + "nolint": { + "type": "nolint" + }, + "text": { + "type": "text" + }, + "spelling": { + "type": "spelling" + } + } +} diff --git a/resources/arclint/include-exclude.arclint.example b/resources/arclint/include-exclude.arclint.example new file mode 100644 index 00000000..e36c20f1 --- /dev/null +++ b/resources/arclint/include-exclude.arclint.example @@ -0,0 +1,13 @@ +{ + "exclude": [ + "(^externals/)", + "(\\.example$)" + ], + "linters": { + "pep8": { + "type": "pep8", + "include": "(\\.py$)", + "exclude": "(^legacy/)" + } + } +}