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",
"5": "disabled"
}
},
"yaml lint": {
"type": "yamllint",
"include": ["(\\.yaml$)", "(\\.yml$)", "(^.yamllint$)"]
}
}
}

View file

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

View file

@ -14,9 +14,10 @@ on:
workflow_dispatch:
jobs:
lint-everything:
yaml-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: yaml-lint
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/
.pinterest-linters/

View file

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