From c53644dc99ad05566aa2595893eb2518847c1b3c Mon Sep 17 00:00:00 2001 From: Steven van der Vegt Date: Tue, 5 Nov 2024 08:44:24 +0000 Subject: [PATCH] Add codeclimate config --- .codeclimate.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..29ac881 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,26 @@ +version: "2" +checks: + # Go returns 'error's rather than throwing exceptions, so the safer the code the more errors are returned. + # To avoid deeply nested if-statements we generally use guard clauses as recommended by Martin Fowler. + # Guard statements are if-statements that, as early as possible, check conditions and return if failed. They improve readability + # over nested if-statements. This however leads to many return statements which can't be avoided, so we'll disable the max. exit points check. + return-statements: + enabled: false +exclude_patterns: + - "**/generated.go" + - "**/test/**/*.go" + - "**/test.go" + - "**/*_test.go" + - "**/test*.go" + - "**/mock/**/*.go" + - "**/mock.go" + - "**/*_mock.go" + - "docs/**/*.go" + - "codegen/**/*.go" + - "**/*.pb.go" + - "e2e-tests/**/*.go" +plugins: + gofmt: + enabled: true + govet: + enabled: true