Skip to content

Commit

Permalink
feat: added repolinter github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mlorenzoitx committed Apr 15, 2024
1 parent 8a0260c commit 12836a2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 46 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/repolinter_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: Apache-2.0
# url: https://github.com/newrelic/repolinter-action
name: 'Validate master branch with Repolinter'

on:
push:
branches:
- main

jobs:
repolinter-action:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: 'Run Repolinter'
uses: newrelic/repolinter-action@v1

68 changes: 22 additions & 46 deletions repolinter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"$schema": "./schema.json",
"version": 2,
"axioms": {
"linguist": "language",
Expand All @@ -17,16 +17,6 @@
}
}
},
"readme-file-exists": {
"level": "error",
"rule": {
"type": "file-existence",
"options": {
"globsAny": ["README*"],
"nocase": true
}
}
},
"contributing-file-exists": {
"level": "error",
"rule": {
Expand Down Expand Up @@ -71,7 +61,7 @@
}
},
"support-file-exists": {
"level": "off",
"level": "error",
"rule": {
"type": "file-existence",
"options": {
Expand All @@ -80,32 +70,21 @@
}
}
},
"readme-references-license": {
"level": "off",
"rule": {
"type": "file-contents",
"options": {
"globsAll": ["README*"],
"content": "license",
"flags": "i"
}
}
},
"binaries-not-present": {
"level": "error",
"rule": {
"type": "file-type-exclusion",
"options": {
"type": ["/*.exe", "/.dll", "!node_modules/"]
"type": ["**/*.exe", "**/*.dll", "!node_modules/**"]
}
}
},
"test-directory-exists": {
"level": "off",
"level": "error",
"rule": {
"type": "directory-existence",
"options": {
"globsAny": ["/test", "/specs"],
"globsAny": ["**/test*", "**/specs"],
"nocase": true
}
}
Expand All @@ -124,40 +103,38 @@
".circleci/config.yml",
"Jenkinsfile",
".drone.yml",
".github/workflows/",
".github/workflows/*",
"azure-pipelines.yml"
]
}
}
},
"code-of-conduct-file-contains-email": {
"level": "off",
"level": "error",
"rule": {
"type": "file-contents",
"options": {
"globsAll": [
"CODEOFCONDUCT",
"CODEOFCONDUCT*",
"CODE-OF-CONDUCT*",
"CODE_OF_CONDUCT*",
".github/CODEOFCONDUCT*",
".github/CODE-OF-CONDUCT*",
".github/CODE_OF_CONDUCT*"
],
"content": ".+@.+..+",
"content": ".+@.+\\..+",
"flags": "i",
"human-readable-content": "email address"
}
}
},
"source-license-headers-exist": {
"level": "warning",
"Reuse github action exists": {
"level": "error",
"rule": {
"type": "file-starts-with",
"type": "file-existence",
"options": {
"globsAll": ["./**/*.go"],
"lineCount": 5,
"patterns": ["Copyright", "License"],
"flags": "i"
"globsAny": [".github/workflows/reuse_lint.yml"],
"nocase": true
}
}
},
Expand All @@ -167,12 +144,12 @@
"type": "file-existence",
"options": {
"dirs": true,
"globsAny": ["ISSUE_TEMPLATE", ".github/ISSUE_TEMPLATE*"]
"globsAny": ["ISSUE_TEMPLATE*", ".github/ISSUE_TEMPLATE*"]
}
}
},
"github-pull-request-template-exists": {
"level": "off",
"level": "error",
"rule": {
"type": "file-existence",
"options": {
Expand Down Expand Up @@ -230,7 +207,7 @@
"rule": {
"type": "file-existence",
"options": {
"globsAny": ["Cartfile", "Podfile", ".podspec"]
"globsAny": ["Cartfile", "Podfile", "*.podspec"]
}
}
},
Expand Down Expand Up @@ -266,7 +243,7 @@
},
"license-detectable-by-licensee": {
"level": "off",
"where": ["license="],
"where": ["license=*"],
"rule": {
"type": "license-detectable-by-licensee",
"options": {}
Expand All @@ -289,23 +266,22 @@
"type": "best-practices-badge-present"
}
},
"internal-file-not-exists": {
"level": "off",
"Use of internal files": {
"level": "error",
"rule": {
"type": "file-not-exists",
"options": {
"globsAll": [
".secrets.baseline",
"sherpa-config.yml",
".snyk",
"sonar-project.properties",
".drafterconfig.yml",
"application-configmap.yml",
"application-secret.yml"
],
"nocase": true
"nocase": true
}
}
}
}
}
}

0 comments on commit 12836a2

Please sign in to comment.