Skip to content

Commit e06ca35

Browse files
committed
Run pre-commit hooks on everything
1 parent b2f2c2f commit e06ca35

File tree

6 files changed

+76
-54
lines changed

6 files changed

+76
-54
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.4.0
3+
rev: v4.0.1
44
hooks:
55
- id: check-merge-conflict
66
- id: trailing-whitespace
@@ -12,7 +12,7 @@ repos:
1212
exclude: ^samples/[^/]+/src/main/java/swagger.json$
1313
- id: check-yaml
1414
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
15-
rev: v2.0.0
15+
rev: v2.1.0
1616
hooks:
1717
- id: pretty-format-java
1818
args: [--autofix]
@@ -22,7 +22,7 @@ repos:
2222
args: [--autofix, --indent, '2']
2323
exclude: ^config/detekt/detekt\.yml$
2424
- repo: https://github.com/Yelp/detect-secrets
25-
rev: v0.14.3
25+
rev: v1.1.0
2626
hooks:
2727
- id: detect-secrets
2828
args: [--baseline, .secrets.baseline]

.secrets.baseline

+49-27
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,68 @@
11
{
2-
"custom_plugin_paths": [],
3-
"exclude": {
4-
"files": null,
5-
"lines": null
6-
},
7-
"generated_at": "2020-10-23T18:25:01Z",
2+
"version": "1.1.0",
83
"plugins_used": [
94
{
105
"name": "AWSKeyDetector"
116
},
127
{
13-
"base64_limit": 4.5,
14-
"name": "Base64HighEntropyString"
8+
"name": "Base64HighEntropyString",
9+
"limit": 4.5
1510
},
1611
{
1712
"name": "BasicAuthDetector"
1813
},
1914
{
20-
"hex_limit": 3,
21-
"name": "HexHighEntropyString"
15+
"name": "HexHighEntropyString",
16+
"limit": 3
2217
},
2318
{
24-
"keyword_exclude": null,
25-
"name": "KeywordDetector"
19+
"name": "KeywordDetector",
20+
"keyword_exclude": ""
2621
},
2722
{
2823
"name": "PrivateKeyDetector"
2924
}
3025
],
31-
"results": {
32-
"gradle.properties.example": [
33-
{
34-
"hashed_secret": "6f9583b0d701174f6b64698f940f9e1470612638",
35-
"is_verified": false,
36-
"line_number": 2,
37-
"type": "Secret Keyword"
38-
}
39-
]
40-
},
41-
"version": "0.14.3",
42-
"word_list": {
43-
"file": null,
44-
"hash": null
45-
}
26+
"filters_used": [
27+
{
28+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
29+
},
30+
{
31+
"path": "detect_secrets.filters.common.is_baseline_file",
32+
"filename": ".secrets.baseline"
33+
},
34+
{
35+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
36+
"min_level": 2
37+
},
38+
{
39+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
40+
},
41+
{
42+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
43+
},
44+
{
45+
"path": "detect_secrets.filters.heuristic.is_lock_file"
46+
},
47+
{
48+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
49+
},
50+
{
51+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
52+
},
53+
{
54+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
55+
},
56+
{
57+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
58+
},
59+
{
60+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
61+
},
62+
{
63+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
64+
}
65+
],
66+
"results": {},
67+
"generated_at": "2021-08-08T15:04:32Z"
4668
}

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ subprojects {
7676
* Python `venv/bin` folder is different based on OS.
7777
* On Windows it's inside the `venv/Scripts` folder.
7878
*/
79-
val binFolder : String get() = if (System.getProperty("os.name").toLowerCase().contains("windows")) {
79+
val binFolder: String get() = if (System.getProperty("os.name").toLowerCase().contains("windows")) {
8080
"Scripts"
8181
} else {
8282
"bin"
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import com.yelp.codegen.plugin.GenerateTaskConfiguration
22

33
buildscript {
4-
repositories {
5-
maven {
6-
url = uri("../../../build/localMaven")
4+
repositories {
5+
maven {
6+
url = uri("../../../build/localMaven")
7+
}
8+
jcenter {
9+
content {
10+
excludeGroup("com.yelp.codegen")
11+
}
12+
}
713
}
8-
jcenter {
9-
content {
10-
excludeGroup("com.yelp.codegen")
11-
}
14+
dependencies {
15+
// Always take the latest version from the local test repo
16+
// This is not super robust and we could find a way to communicate the version to the testProject
17+
// by copying the root buildSrc to the testProject or extracting the version in a properties file
18+
classpath("com.yelp.codegen:plugin:+")
1219
}
13-
}
14-
dependencies {
15-
// Always take the latest version from the local test repo
16-
// This is not super robust and we could find a way to communicate the version to the testProject
17-
// by copying the root buildSrc to the testProject or extracting the version in a properties file
18-
classpath("com.yelp.codegen:plugin:+")
19-
}
2020
}
2121

2222
apply(plugin = "com.yelp.codegen.plugin")
2323

2424
configure<GenerateTaskConfiguration> {
25-
platform.set("kotlin")
26-
packageName.set("com.yelp.codegen.samples")
27-
// we are in rootDir/plugin-root/plugin/build/testProject/
28-
inputFile.set(file("../../../../samples/junit-tests/junit_tests_specs.json"))
29-
outputDir.set(file("./build/generatedSources"))
25+
platform.set("kotlin")
26+
packageName.set("com.yelp.codegen.samples")
27+
// we are in rootDir/plugin-root/plugin/build/testProject/
28+
inputFile.set(file("../../../../samples/junit-tests/junit_tests_specs.json"))
29+
outputDir.set(file("./build/generatedSources"))
3030
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name="testProject"
1+
rootProject.name = "testProject"

settings.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ includeBuild("gradle-plugin")
3232
fun shouldIncludeAndroidProjects(): Boolean {
3333
if (System.getenv("CI") != null) {
3434
// Ensure that on CI systems we run all the gradle tasks (including the Android specific ones)
35-
return true;
35+
return true
3636
}
3737

3838
if (System.getenv("SKIP_ANDROID") != null) {
39-
return false;
39+
return false
4040
}
4141

42-
return true;
42+
return true
4343
}

0 commit comments

Comments
 (0)