CI(.arclint): use Pinterest Arcanist Linter

Summary:
Thanks pinterest!

Also fix some GitHub Actions error.

Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: run `arc lint`?

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D325
This commit is contained in:
revi 2024-06-16 14:43:28 +09:00
parent 41b70cb468
commit b1740bd0cd
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
9 changed files with 30 additions and 25 deletions

View file

@ -1,3 +1,4 @@
{ {
"phabricator.uri": "https://issuetracker.revi.xyz" "phabricator.uri": "https://issuetracker.revi.xyz",
"load": [".pinterest-linters"]
} }

View file

@ -53,6 +53,10 @@
"3": "disabled", "3": "disabled",
"5": "disabled" "5": "disabled"
} }
},
"yaml lint": {
"type": "yamllint",
"include": ["(\\.yaml$)", "(\\.yml$)", "(^.yamllint$)"]
} }
} }
} }

4
.gitattributes vendored
View file

@ -19,5 +19,5 @@
# GitHub Linguist detection # GitHub Linguist detection
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md # https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
.arclint linguist-language=json .arclint linguist-language=json
.yamllint linguist-language=yaml .yamllint linguist-language=yaml

View file

@ -12,5 +12,7 @@ jobs:
phpsyntax: phpsyntax:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout
uses: actions/checkout@v4
- name: PHP Basic Syntax Check - name: PHP Basic Syntax Check
run: php -l {{ $github.workspace }}/PhabExt/PhabricatorCustomRobotsTxtController.php run: php -l {{ $github.workspace }}/PhabExt/PhabricatorCustomRobotsTxtController.php

View file

@ -14,9 +14,10 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
lint-everything: yaml-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
uses: actions/checkout@v4
- name: yaml-lint - name: yaml-lint
uses: ibiqlik/action-yamllint@v3 uses: ibiqlik/action-yamllint@v3

5
.gitmodules vendored Normal file
View file

@ -0,0 +1,5 @@
# @generated
# This file was generated by the git command.
[submodule ".pinterest-linters"]
path = .pinterest-linters
url = https://github.com/pinterest/arcanist-linters.git

1
.pinterest-linters Submodule

@ -0,0 +1 @@
Subproject commit 57a316545efd54cb590d41b24e644fc6e6e7736a

View file

@ -1 +1,2 @@
node_modules/ node_modules/
.pinterest-linters/

View file

@ -4,32 +4,22 @@ yaml-files:
- '*.yml' - '*.yml'
- '.yamllint' - '.yamllint'
extends: default
ignore-from-file: .gitignore
rules: rules:
anchors: enable comments-indentation: {}
braces: enable document-start:
brackets: enable present: true
colons: enable
commas: enable
comments:
level: warning level: warning
comments-indentation:
level: warning
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
float-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length: line-length:
max: 80
level: warning level: warning
new-line-at-end-of-file: new-line-at-end-of-file:
level: warning level: warning
new-lines: enable
octal-values: disable
quoted-strings: disable quoted-strings: disable
trailing-spaces: enable
truthy: truthy:
level: warning level: warning
# on: included because GitHub Actions
allowed-values: ['on', 'true', 'false']