From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 1DB5A1FF0AA for ; Fri, 21 Aug 2026 15:07:44 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E925D21587; Fri, 21 Aug 2026 15:07:39 +0200 (CEST) From: Shan Shaji To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox_dart_api_client 1/1] cleanup: avoid print statements Date: Fri, 21 Aug 2026 15:07:18 +0200 Message-ID: <20260821130718.330515-4-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260821130718.330515-1-s.shaji@proxmox.com> References: <20260821130718.330515-1-s.shaji@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787317621194 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.580 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_SHORT 0.001 Use of a URL Shortener for very short URL RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: IY5EYQBIWM64DCICM3SLDFQHBJVUC3V3 X-Message-ID-Hash: IY5EYQBIWM64DCICM3SLDFQHBJVUC3V3 X-MailFrom: s.shaji@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Dart linter rules recommend avoiding print statements [0]. To align with this, remove all print statements. The lints recommended.yaml config [1] does not have the rule by default so explicitly add it. - [0] https://dart.dev/tools/linter-rules/avoid_print - [1] https://github.com/dart-lang/core/blob/main/pkgs/lints/rules.md Signed-off-by: Shan Shaji --- analysis_options.yaml | 6 +++--- lib/src/authenticate.dart | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index bf158d5..d1644c7 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -5,9 +5,9 @@ include: package:lints/recommended.yaml # For lint rules and documentation, see http://dart-lang.github.io/linter/lints. # Uncomment to specify additional rules. -# linter: -# rules: -# - camel_case_types +linter: + rules: + - avoid_print analyzer: errors: diff --git a/lib/src/authenticate.dart b/lib/src/authenticate.dart index 7bd9cef..e508fd9 100644 --- a/lib/src/authenticate.dart +++ b/lib/src/authenticate.dart @@ -36,7 +36,6 @@ Future authenticate( // for backward compat with older products, e.g. PVE < 7.1, retry without 'new-format' if (response.statusCode == 400) { - print("retrying for backward compat!"); final errors = jsonDecode(response.body)['errors'] ?? {}; if (errors.containsKey('new-format')) { var body = { -- 2.47.3