Initial version of job

This commit is contained in:
Jonas Bengtsson 2020-01-03 11:37:01 +01:00
commit 39774526ec
10 changed files with 137 additions and 0 deletions

19
.github/android-lint-file-matcher.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
// Example:
// /path/to/file/file.class: Warning: checkClientTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers [TrustAllX509TrustManager]
"problemMatcher": [
{
"owner": "android-lint-file",
"pattern": [
{
"regexp": "^(.+):\\s+(Warning|Error):\\s+(.+)\\s+\\[(.+)\\]$",
"file": 1,
"severity": 2,
"message": 3,
"code": 4,
"kind": "file"
}
]
}
]
}

19
.github/android-lint-line-matcher.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
// Example:
// /path/to/file/build.gradle:55: Warning: A newer version of androidx.core:core-ktx than 1.2.0-beta01 is available: 1.2.0-rc01 [GradleDependency]
"problemMatcher": [
{
"owner": "android-lint-line",
"pattern": [
{
"regexp": "^(.+):(\\d+):\\s+(Warning|Error):\\s+(.+)\\s+\\[(.+)\\]$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4,
"code": 5
}
]
}
]
}

23
.github/gradle-matcher.json vendored Normal file
View file

@ -0,0 +1,23 @@
{
// Example:
// warning unused-exclude-by-conf the exclude dependency is not in your dependency graph, so has no effect
// app/build.gradle:45
"problemMatcher": [
{
"owner": "gradle",
"pattern": [
{
"regexp": "^(error|quiet|warning|lifecycle|info|debug)\\s+(\\S+)\\s+(.+)$",
"severity": 1,
"code": 2,
"message": 3
},
{
"regexp": "^([^\\s]+):([\\d]+)$",
"file": 1,
"line": 2
}
]
}
]
}

19
.github/kotlin-error-matcher.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
// Example:
// e: /path/to/file/KotlinFile.kt: (14, 5): Val cannot be reassigned
"problemMatcher": [
{
"owner": "kotlin-error",
"pattern": [
{
"regexp": "^e:\\s+(\\S+):\\s+\\((\\d+),\\s+(\\d+)\\):\\s+(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
],
"severity": "error"
}
]
}

19
.github/kotlin-warning-matcher.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
// Example:
// w: /path/to/file/KotlinFile.kt: (14, 5): Parameter 'foo' is never used
"problemMatcher": [
{
"owner": "kotlin-warning",
"pattern": [
{
"regexp": "^w:\\s+(\\S+):\\s+\\((\\d+),\\s+(\\d+)\\):\\s+(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
],
"severity": "warning"
}
]
}

11
README.md Normal file
View file

@ -0,0 +1,11 @@
# Android Problem Matchers
Adds common problem matchers for Android builds to GitHub Action workflows.
## Inputs
No inputs are needed.
## Outputs
No outputs are generated apart from configured problem matchers.

5
action.yml Normal file
View file

@ -0,0 +1,5 @@
name: 'Android Problem Matchers'
description: 'Adds common problem matchers for Android builds'
runs:
using: 'node12'
main: 'index.js'

5
index.js Normal file
View file

@ -0,0 +1,5 @@
console.log("::add-matcher::.github/android-lint-file-matcher.json");
console.log("::add-matcher::.github/android-lint-line-matcher.json");
console.log("::add-matcher::.github/gradle-matcher.json");
console.log("::add-matcher::.github/kotlin-error-matcher.json");
console.log("::add-matcher::.github/kotlin-warning-matcher.json");

5
package-lock.json generated Normal file
View file

@ -0,0 +1,5 @@
{
"name": "android-problem-matchers-action",
"version": "1.0.0",
"lockfileVersion": 1
}

12
package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "android-problem-matchers-action",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}