From 4a6cb11f3a4bce2cbc43e98ffc5c8bff951a32ad Mon Sep 17 00:00:00 2001 From: Steve Hu Date: Thu, 8 Feb 2024 17:35:25 -0500 Subject: [PATCH] fixes #105 add pre-commit hook and apply it --- .gitignore | 2 +- .pre-commit-config.yaml | 14 ++++++++++++++ NOTICE | 1 - .../java/com/networknt/auth/GithubAuthHandler.java | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 59c9cb3..b191804 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ dist/ hs_err_pid* !rest.zip -**/.DS_Store \ No newline at end of file +**/.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..bbb4368 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/networknt/pre-commit-hook-keyword + rev: f17c4de14fc24420f6768c19cad06ba03af06d86 + hooks: + - id: keywordscan + args: ["--keywords=c3VubGlmZQ==,Y2liYw==,c3VuIGxpZmU="] + types: ["text"] diff --git a/NOTICE b/NOTICE index d6c7b1f..cd96ff3 100644 --- a/NOTICE +++ b/NOTICE @@ -68,4 +68,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/stateless-auth/src/main/java/com/networknt/auth/GithubAuthHandler.java b/stateless-auth/src/main/java/com/networknt/auth/GithubAuthHandler.java index 25d1409..df3ac67 100644 --- a/stateless-auth/src/main/java/com/networknt/auth/GithubAuthHandler.java +++ b/stateless-auth/src/main/java/com/networknt/auth/GithubAuthHandler.java @@ -71,4 +71,4 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception { } } -} \ No newline at end of file +}