From 0780d3196b9d5fa9e4832ff15957c0f8fd517b4b Mon Sep 17 00:00:00 2001 From: Spolti Date: Tue, 28 Nov 2023 16:03:43 -0300 Subject: [PATCH] rename the pre-commint log file Signed-off-by: Spolti --- .gitignore | 2 ++ .pre-commit-config.yaml | 2 ++ scripts/fmt.sh | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3a8674b..2b11744 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ google/ # IDE .idea/ + +.pre-commit.log \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b7dca5..980c3d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,7 @@ repos: rev: v1.51.1 hooks: - id: golangci-lint + log_file: .pre-commit.log entry: golangci-lint run exclude: ^(gen/) args: @@ -24,6 +25,7 @@ repos: rev: v2.4.1 hooks: - id: prettier + log_file: .pre-commit.log exclude: ^(.github/) args: - --no-bracket-spacing diff --git a/scripts/fmt.sh b/scripts/fmt.sh index 624e566..faa974f 100755 --- a/scripts/fmt.sh +++ b/scripts/fmt.sh @@ -11,13 +11,13 @@ # 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.# +# limitations under the License. pre-commit run --all-files RETURN_CODE=$? ## cat this file for helping on identifying the root cause when some issue happens -if [ -f /$USER/.cache/pre-commit/pre-commit.log ]; then - cat /$USER/.cache/pre-commit/pre-commit.log +if [ -f .pre-commit.log ]; then + cat .pre-commit.log fi function echoError() {