{ "info": { "author": "James D. Mitchell, Simon Tollman", "author_email": "jdm3@st-andrews.ac.uk, skt4@st-andrews.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "*********************************************************\nREADME - gaplint - by James D. Mitchell and Simon Tollman\n*********************************************************\n\n``gaplint`` automatically checks the format of a GAP file according to\nsome conventions, which are somewhat configurable. It prints the nature\nand location of instances of any instances of violations of these\nconventions (see below for more details).\n\nInstallation\n============\n\nSimply run::\n\n $ pip install gaplint\n\nUsage\n=====\n\nTo use it::\n\n $ gaplint --help\n\nList of all rules\n=================\n\nTo disable all rules for a particular file you can add the line::\n\n # gaplint: disable = all\n\nto the start of the file before any lines that contain any code. All\nrules are enabled by default.\n\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| Code | Name | Rule Description |\n+============+=======================================+=================================================================================================+\n| ``W000`` | ``analyse-lvars`` | Warns if there are declared local variables that are not used or assigned but not used |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W001`` | ``empty-lines`` | Warns if there are consecutive empty lines |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W002`` | ``line-too-long`` | Warns if there is a line which is longer than the configured maximum (defaults to 80) |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W003`` | ``indentation`` | Warns if a line is under indented |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W004`` | ``align-assignments`` | Warns if there are assignments in consecutive lines that are not aligned |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W005`` | ``align-trailing-comments`` | Warns if there are trailing comments in consecutive lines that are not aligned |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W006`` | ``align-comments`` | Warns if there are non-trailing comments in consecutive lines that are not aligned |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W007`` | ``trailing-whitespace`` | Warns if there is trailing whitespace at the end of a line |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W008`` | ``no-space-after-comment`` | Warns if there is no space after any number of # is a line |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W009`` | ``not-enough-space-before-comment`` | Warns if there is not enough space before the first # in any line (defaults to 2) |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W010`` | ``space-after-comma`` | Warns if a comma is followed by more than one space |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W011`` | ``space-before-comma`` | Warns if a comma is preceded by a space |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W012`` | ``space-after-bracket`` | Warns if there is a space after an opening bracket |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W013`` | ``space-before-bracket`` | Warns if there is a space before a closing bracket |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W014`` | ``multiple-semicolons`` | Warns if there is more than one semicolon in a line |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W015`` | ``keyword-function`` | Warns if the keyword *function* is not followed by an open bracket |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W016`` | ``whitespace-op-assign`` | Warns if there is not exactly one space after an assignment (:=) |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W017`` | ``tabs`` | Warns if there are tabs |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W018`` | ``function-local-same-line`` | Warns if the keywords *function* and *local* appear in the same line |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W019`` | ``whitespace-op-minus`` | Warns if there is not exactly one space either side of a minus (-) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W020`` | ``whitespace-op-plus`` | Warns if there is not exactly one space either side of a plus (+) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W021`` | ``whitespace-op-multiply`` | Warns if there is not exactly one space either side of a multiply (\\*) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W022`` | ``whitespace-op-negative`` | Warns if there is not exactly one space preceding a negative (-) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W023`` | ``whitespace-op-less-than`` | Warns if there is not exactly one space either side of a less-than (<) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W024`` | ``whitespace-op-less-equal`` | Warns if there is not exactly one space either side of a less-than / equal-to (<=) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W025`` | ``whitespace-op-more-than`` | Warns if there is not exactly one space either side of a greater-than(>) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W026`` | ``whitespace-op-more-equal`` | Warns if there is not exactly one space either side of greater than or equal to (>=) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W027`` | ``whitespace-op-equals`` | Warns if there is not exactly one space either side of equals (=) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W028`` | ``whitespace-op-mapping`` | Warns if there is not exactly one space either side of mapping (->) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W029`` | ``whitespace-op-divide`` | Warns if there is not exactly one space either side of divide (/) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W030`` | ``whitespace-op-power`` | Warns if there is not exactly one space either side of the power (^) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W031`` | ``whitespace-op-not-equal`` | Warns if there is not exactly one space either side of not-equal (<>) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n| ``W032`` | ``whitespace-op-double-dot`` | Warns if there is not exactly one space either side of arithmetic progression (..) operator |\n+------------+---------------------------------------+-------------------------------------------------------------------------------------------------+\n\nConfiguration\n=============\n\nCertain parameters can be configured, for example, the maximum number of\ncharacters permitted per line. All rules are enabled by default but can\nbe disable at the command line, by comments in the file itself, or in a\nconfiguration file ``.gaplint.yml``.\n\n**Configuration keywords:**\n\n- ``columns``: maximum number of characters per line. *Defaults to 80*.\n- ``max-warnings``: maximum number of warnings before ``gaplint``\n aborts. *Defaults to 1000*.\n- ``indentation``: minimum indentation of nested statements. *Defaults\n to 2*.\n- ``disable``: rules can be disabled using their name or code.\n *Defaults to no rules disabled*.\n\nA list of all of the rules that ``gaplint`` can apply is given below.\n\nYou can alter the configuration in various places, the order of\nprecedence of these is governed by a hierarchy described below. A\npreference given somewhere higher on the hierarchy than another will be\ngiven precedence. Disabled rules accumulate through the hierarchy.\n\nConfiguration\n=============\n\nVia the command line\n^^^^^^^^^^^^^^^^^^^^\n\nThese preferences will be applied for a single run of ``gaplint`` only (though\nmultiple files may be linted in this run). To configure ``gaplint`` to be run\non ``file1``, ``file2``, ..., with preferences as in the example above, we\nenter the following into the command line::\n\n gaplint --columns=100 --indentation=4 --disable=W002,W028 file1 file2 ...\n\nVia comments in source files\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAny rule, including ``all``, can be suppressed for a specific line or for a\nwhole file:\n\n* To supress a rule(s) for a given line, include the following after the line\n of code for which the rule is to be suppressed::\n\n # gaplint: disable=, ...\n\n* If the above is too long to fit after the relevant line of code,\n suppressions can be declared in the line above for the line below\n by including ``(nextline)``::\n\n # gaplint: disable(nextline)=, , ...\n\n* If rules have been suppressed for a given line using both the\n in-line and *nextline* options, the union of the two rule sets\n given for suppression will be disabled for the line.\n\n* To suppress rules for a whole file the following must be included\n before any code is written (i.e. either as the first line of a GAP\n file, or preceded by any combination of only whitespace, empty\n lines and comments)::\n\n # gaplint: disable=, , ...\n\nVia a configuration file\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n To configure ``gaplint`` as in the above examples, create a\n ``.gaplint.yml`` file containing the following lines:\n\n .. code:: yaml\n\n columns: 100\n indentation: 4\n disable:\n - W002\n - W028\n\n``gaplint`` looks for the ``.gaplint.yml`` file in the current\ndirectory, and its ancestors, until it reaches a directory containing\na ``git`` repository or the ``.gaplint.yml`` file is located. If\nthere is no ``.gaplint.yml`` file, then the default configuration\noptions are used. The options configured in ``.gaplint.yml`` are\napplied to every file on which ``gaplint`` is run from the current\ndirectory unless overruled higher in the hierarchy.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/james-d-mitchell/gaplint", "keywords": "", "license": "GPL3", "maintainer": "", "maintainer_email": "", "name": "gaplint", "package_url": "https://pypi.org/project/gaplint/", "platform": "any", "project_url": "https://pypi.org/project/gaplint/", "project_urls": { "Homepage": "https://github.com/james-d-mitchell/gaplint" }, "release_url": "https://pypi.org/project/gaplint/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "A rudimentary linter for GAP (https://www.gap-system.org/) code.", "version": "1.0.2" }, "last_serial": 3780230, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "d1da297a07af78ebcfe8f863397f6eaf", "sha256": "447514f7375f1bd051dcfc1612b32bf32cd65c0eaaf13f4f9dc8568ddbbfd94b" }, "downloads": -1, "filename": "gaplint-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d1da297a07af78ebcfe8f863397f6eaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18550, "upload_time": "2018-04-18T16:37:42", "url": "https://files.pythonhosted.org/packages/43/77/9550c8ae5726e7bbdf23047274852474aa8a14615425ee3aa8cf44ff3a5b/gaplint-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "aceb9fe7c08ead4db62231ef6ed23b87", "sha256": "062457f435860ee9ac32ee77b2e82bbd09a65f066e00eb3d7a1923c4b6df3a5c" }, "downloads": -1, "filename": "gaplint-1.0.2.tar.gz", "has_sig": false, "md5_digest": "aceb9fe7c08ead4db62231ef6ed23b87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18423, "upload_time": "2018-04-19T11:06:42", "url": "https://files.pythonhosted.org/packages/ca/f1/8be640e32a5510b872563f463a2e85c3edd78a7e9afa3dfaad881fcabcfb/gaplint-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aceb9fe7c08ead4db62231ef6ed23b87", "sha256": "062457f435860ee9ac32ee77b2e82bbd09a65f066e00eb3d7a1923c4b6df3a5c" }, "downloads": -1, "filename": "gaplint-1.0.2.tar.gz", "has_sig": false, "md5_digest": "aceb9fe7c08ead4db62231ef6ed23b87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18423, "upload_time": "2018-04-19T11:06:42", "url": "https://files.pythonhosted.org/packages/ca/f1/8be640e32a5510b872563f463a2e85c3edd78a7e9afa3dfaad881fcabcfb/gaplint-1.0.2.tar.gz" } ] }