From patchwork Tue May 29 20:36:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via arch-projects X-Patchwork-Id: 558 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id B4BBB47291FF for ; Tue, 29 May 2018 20:36:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on apollo X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3,T_DKIMWL_WL_HIGH=-0.01 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-BL-Results: [127.0.0.10] [127.0.9.2] [127.0.0.10] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Tue, 29 May 2018 20:36:48 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 7798DAC8DCE2A; Tue, 29 May 2018 20:36:40 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Tue, 29 May 2018 20:36:40 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 591DD2D348; Tue, 29 May 2018 20:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1527626200; bh=PUi70RrMtk4k4jw6Wh30IMsnJfuW2+UiuJVeoRareJs=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=P6sUwEZWZBDKT656u5TLsxiLU6/o0mOJQdRtSF++cwLiNQaONrQQ/XhZHeBI7G1gX UgHfl/O0rKmZoUtTSCI/uFlLzXxQok2LChg8tGmz02QwpBHCPaOUZncwNh9ocJMhLL gRfAZRqxsF3vP3jSJtf3Ln7nwrSXufYB/72dE9ymDD4TZCvfjej8n7gK9MonkIG2KD qVkkwkYMFNAtGeYbAC080ihnwvoU5oVG85ld8msSYaoU/OnAgZvzkrnUu1WVSw7u69 0uHQN/9FdRS5VXxiJNhP1A8GPhLNU6reXd7vHaKOBnvNOeVUhnupPVERiqQ7Ni+PkT ul0nrEyrG3oT74R3YqEFnsSOlUkl8/49E+duFVNNSg+Qx+9sYDl8Nf3OJum1XMqvpR b3zub0obmnFgdxa5WBnmyq1JK/jpl0hOfgwHAB47t31Mjl+n1uCucn8w3artoBxIsP bCZj3L1iVpNbLUOQ8Atl4aqJEL+lQj/AgPDXXcsiP1bUWVufc5jJHzD6KzI/HS4LRb rJLQI+SuZYqtswY9lJdzeaDPG/Vaqa/Vt9/9MpMk40eivT4sxy30aILZwA/6LPcuIz hDsGN+Mqa5oJnYtsWI39P40ul0DDcbh+CXJX3nPYkI6x6L4z+vNbkNoBK11LUPN75j yIvN/v6E4F5lF9T5bUpthTIs= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 6BE6C2D348 for ; Tue, 29 May 2018 20:36:39 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Tue, 29 May 2018 20:36:39 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 64A2DAC8DCE28 for ; Tue, 29 May 2018 20:36:33 +0000 (UTC) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Tue, 29 May 2018 20:36:33 +0000 (UTC) Received: by mail-qk0-x241.google.com with SMTP id j12-v6so9274987qkk.4 for ; Tue, 29 May 2018 13:36:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1uaQJ+Z8gcZwenDAyrrEZnborg0XLMy10i1XSx/dfV4=; b=COxkrxKWX6fNocKNeSxVa//hAj0Za91NPaINFVnwW+ClallmYqEscTlA+KkhgrRGiz JrULqcIcuO8L25G1mwreVMZJngoZ2eG2iGBovWXMnD7TBkXeEH94YdK4ZsGp8GxRE5MM BxpOr3kHBC3IHO0fMlEhjWM4Cx3ONeoq9hCnGbfcPem4hK8tERBlu6KGgdl9YK6+JG8M U+/TL2s6J5CYI29OTln77L3JQLdz9Lbq+xSikOMXwMFbApE3oSAeRPkyuGGr1+mCu8wV 2KNtuq5x05dS0TN/f2qRyYnTfffqK9g0T3PNEcFyBcpOPOZgvxoJ6h5DyRFbM7C+szqg XhPw== X-Gm-Message-State: ALKqPwdIL47QsPoWOv7iWbidOF/Zj/fHYdEnLvo40OoJ5mSEnUZaZBjp 6p4Ia09D0l3ykZENQVTeK15nddde X-Google-Smtp-Source: ADUXVKJ1fN8FcwcKUSyHvEIbM6haIJHlDbyER78467pgN0e5XgonL+RsVI4IcTxyV8TA5W9d0bKebg== X-Received: by 2002:a37:6303:: with SMTP id x3-v6mr647036qkb.430.1527626191899; Tue, 29 May 2018 13:36:31 -0700 (PDT) Received: from bound.voidedtech.network (c-68-55-124-234.hsd1.mi.comcast.net. [68.55.124.234]) by smtp.gmail.com with ESMTPSA id 3-v6sm10569849qtx.16.2018.05.29.13.36.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 13:36:30 -0700 (PDT) To: arch-projects@archlinux.org Date: Tue, 29 May 2018 16:36:27 -0400 Message-Id: <20180529203627.12891-1-enckse@gmail.com> X-Mailer: git-send-email 2.17.0 Subject: [arch-projects] [namcap][PATCH] A handful of corrections to the namcap usage output X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sean Enck via arch-projects Reply-To: Arch Linux projects development discussion Cc: Sean Enck Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" noticed the following items in the usage output of namcap: 1. Displaying the site-packages path of namcap and not just 'namcap' 2. Missing long options in usage output 3. Not displaying anything about -h/--help (even if that's a given) Signed-off-by: Sean Enck --- namcap.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/namcap.py b/namcap.py index b62a2fa..8940e88 100755 --- a/namcap.py +++ b/namcap.py @@ -41,16 +41,17 @@ def get_modules(): def usage(): """Display usage information""" print("") - print("Usage: " + sys.argv[0] + " [OPTIONS] packages") + print("Usage: namcap [OPTIONS] packages") print("") print("Options are:") print(" -L, --list : list available rules") - print(" -i : prints information (debug) responses from rules") - print(" -m : makes the output parseable (machine-readable)") + print(" -i, --info : prints information (debug) responses from rules") + print(" -m, --machine-readable : makes the output parseable (machine-readable)") print(" -e rulelist, --exclude=rulelist : don't apply RULELIST rules to the package") print(" -r rulelist, --rules=rulelist : only apply RULELIST rules to the package") - print(" -t tags : use a custom tag file") - print(" -v version : print version and exit") + print(" -t filename, --tags=filename : use a custom tag file") + print(" -v, --version : print version and exit") + print(" -h, --help : print help and exit") sys.exit(2)