# tests
lcov.info
coverage/
+
+# eslint
+eslint-report.json
args = ['build']
}
-task "yarn_lint-report"() {
-
+"yarn_validate-ci" {
+ // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
+ ['config', 'src'].each {
+ inputs.dir(it)
+ }
+ ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc'].each {
+ inputs.file(it)
+ }
+ outputs.file('eslint-report.json')
+ outputs.dir('coverage')
+ outputs.cacheIf { true }
}
task zip(type: Zip) {
"format": "prettier --write --list-different 'src/**/*.{js,ts,tsx,css}'",
"format-check": "prettier --list-different 'src/**/*.{js,ts,tsx,css}'",
"lint": "eslint --ext js,ts,tsx --quiet src",
+ "lint-report": "eslint --ext js,ts,tsx -f json -o eslint-report.json src",
"ts-check": "tsc --noEmit",
"validate": "yarn lint && yarn ts-check && yarn format-check && yarn test",
- "validate-ci": "yarn lint && yarn ts-check && yarn format-check && yarn test"
+ "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage"
},
"prettier": {
"jsxBracketSameLine": true,
}
build.dependsOn(yarn_run)
+"yarn_validate-ci" {
+ // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
+ ['config', 'src/main/js',
+ '../sonar-web/src/main/js/api',
+ '../sonar-web/src/main/js/app',
+ '../sonar-web/src/main/js/components',
+ '../sonar-web/src/main/js/helpers'
+ ].each {
+ inputs.dir(it)
+ }
+ ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc', '.eslintignore'].each {
+ inputs.file(it)
+ }
+ outputs.file('eslint-report.json')
+ outputs.dir('coverage')
+ outputs.cacheIf { true }
+}
+
def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
}
build.dependsOn(yarn_run)
+"yarn_validate-ci" {
+ // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
+ ['config', 'src/main/js'].each {
+ inputs.dir(it)
+ }
+ ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc'].each {
+ inputs.file(it)
+ }
+ outputs.file('eslint-report.json')
+ outputs.dir('coverage')
+ outputs.cacheIf { true }
+}
+
def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {