From 6360503bb8d709db3f1c7ee5d4aca2362ce21b82 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 8 May 2023 20:01:37 +0300 Subject: [PATCH] .pre-commit-config.yaml: enable trailing whitespace fixer --- .pre-commit-config.yaml | 2 ++ nodejs/myip.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b01f5b..e184e5e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,8 @@ repos: - id: detect-private-key - id: end-of-file-fixer - id: fix-byte-order-marker + - id: trailing-whitespace + exclude_types: [markdown] - repo: https://github.com/thlorenz/doctoc rev: v2.2.0 hooks: diff --git a/nodejs/myip.js b/nodejs/myip.js index 9fab229..4032eaa 100755 --- a/nodejs/myip.js +++ b/nodejs/myip.js @@ -33,7 +33,7 @@ var myip6 = function () { // Check where myip.opendns.com resolves to and I think this is a function // that takes arguments err and addresses. dns.resolve6('myip.opendns.com', function (err, addresses) { - + // if err contains a truthy value, an error has occurred if (err) throw err;