From nobody Thu Dec 29 14:24:01 2022 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NjVxt3DFpz1LrDD for ; Thu, 29 Dec 2022 14:24:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NjVxt1SWzz46jY for ; Thu, 29 Dec 2022 14:24:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672323842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1pXlnuJsIB3Ica9JI/IRx/sbwrh/7q+c99HHrEOoF4=; b=jxPsE+BBpuclpyRhrio3Rpn2FqhKlG7AORxPiJH8w4i50VJkqmtBL7TDxhoTWH5/iz0P3J Ua68MN4zsaTLgn4Rp1yNnVwQZUHrl9nzXkO9KUWZfo+wD+x1By4Zoijx6hjP93S8y32wlW I+oH/M1hDaRPjVNg4Jo67uHRxFoe7+9WfuQlx2S1cXtVWfAygpJEzRNNxzOBPuJVfohEHl fUSJqYEK+uL5fDY2WWpQXaHv4wy18acd3GWdO8arR/thuwwHYTh1MXQeeYrwiYTdYkoGlQ qOOkjOGcwCuFTjEQ1Ia4uNhgmjihmVRB6qWmpRXtlaKyV1G9UTha3Qg0CgH8KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672323842; a=rsa-sha256; cv=none; b=MJ9mT/jwniF0ynX/21U79vcnzT/1mhcON0+HyZ4XmtgdUlp1SUf2tvlmLhKUuA5YkUcCQD nM1dOg7mr7yD8qAVhxf3n4saWkOZ+wJpe7x/YBBXat9QKBYr8vSu7HHxYNZ/hovGX0dzcj GBawNwoh/Fyi0K2w0A32GvDXHo6KL3AH/XeFU+kBuAzPuKbj8+RcyVdIwG5ObRIfhirK1e XHbOV8g5bb0xdVlWWckhq6AZXE84r8pIOMIOhNiPYUAqBK/Y72sb/rcEHj8YGCcTsyUC++ birtLx8o5L9249pri8/TQlYprgQx/m5WrLXTpJG44z+xBajn7cQx7YwPTACmgA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NjVxt0WT7zXCl for ; Thu, 29 Dec 2022 14:24:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2BTEO2Bl030875 for ; Thu, 29 Dec 2022 14:24:02 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2BTEO2lt030874 for ports-bugs@FreeBSD.org; Thu, 29 Dec 2022 14:24:02 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 268640] ports-mgmt/portlint: reported line numbers are sometimes wrong Date: Thu, 29 Dec 2022 14:24:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: vidar@karlsen.tech X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: marcus@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268640 Bug ID: 268640 Summary: ports-mgmt/portlint: reported line numbers are sometimes wrong Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: marcus@FreeBSD.org Reporter: vidar@karlsen.tech Flags: maintainer-feedback?(marcus@FreeBSD.org) Assignee: marcus@FreeBSD.org I have noticed that portlint sometimes reports the wrong line numbers for warnings and errors. Below, I have inserted errors into a port's Makefile to demonstrate how it = gets reported by portlint. Putting a !=3D on line 15, portlint says it is on line 13: # grep -n THIS Makefile 15:TRYTHIS!=3D echo # portlint WARN: Makefile: [13]: use of !=3D in assignments is almost never a good thi= ng to do. Try to avoid using them. See http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for = some helpful hints on what to do instead. WARN: Makefile: [13]: possible direct use of command "echo" found. use ${ECHO_CMD} or ${ECHO_MSG} instead. 0 fatal errors and 2 warnings found. Putting some trailing whitespaces on line 13, portlint gets the whitespaces right, but thinks the !=3D is on the same line: # grep -n " " Makefile 13:USES=3D gmake tar:tgz <-- three whitespaces at the end = of the line here # portlint WARN: Makefile: [13]: whitespace before end of line. WARN: Makefile: [13]: use of !=3D in assignments is almost never a good thi= ng to do. Try to avoid using them. See http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for = some helpful hints on what to do instead. WARN: Makefile: [13]: possible direct use of command "echo" found. use ${ECHO_CMD} or ${ECHO_MSG} instead. 0 fatal errors and 3 warnings found. Adding another variable above the !=3D line, portlint now thinks the !=3D i= s on line 15 while it should say 16: # egrep -n "THIS|SOMEOTHER| " Makefile 13:USES=3D gmake tar:tgz=20=20=20 15:SOMEOTHER=3D 1 16:TRYTHIS!=3D echo # portlint WARN: Makefile: [13]: whitespace before end of line. WARN: Makefile: [15]: use of !=3D in assignments is almost never a good thi= ng to do. Try to avoid using them. See http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for = some helpful hints on what to do instead. WARN: Makefile: [15]: possible direct use of command "echo" found. use ${ECHO_CMD} or ${ECHO_MSG} instead. 0 fatal errors and 3 warnings found. --=20 You are receiving this mail because: You are the assignee for the bug.=