citation-file-format / cffconvert

Command line program to validate and convert CITATION.cff files.
Apache License 2.0
100 stars 28 forks source link

pylint-via-prospector hiccs up over `setup.cfg` line #296

Closed sdruskat closed 1 year ago

sdruskat commented 1 year ago

Running pylint over prospector (locally or in CI) produces the error as witnessed in e.g. this CI linting run:

usage: pylint [options]
pylint: error: argument --include-naming-hint: (None, "Invalid yn value 'cffconvert, cffconvert.*', 
    should be in ('true', 'y', 'yes', 'no', 'false', 'n')")

The only instance of this string (cffconvert, cffconvert.*) is here:

https://github.com/citation-file-format/cff-converter-python/blob/fffb903e4339b28264fe1ab5e572ec25a898b72a/setup.cfg#L77-L78

and indeed, if these lines are commented out, the error disappears (and all pylint errors appear).

I don't know much about pylint, but am assuming that this isn't intended behaviour. It rather seems as if pylint misreads this to be one of its configuration options, especially as prospector reports an external pylint config in setup.cfg (this is shown when the lines mentioned above are commented out):

Check Information
=================
         Started: 2023-02-13 16:09:42.202910
        Finished: 2023-02-13 16:10:04.181746
      Time Taken: 21.98 seconds
       Formatter: grouped
        Profiles: .prospector.yml, no_doc_warnings, strictness_veryhigh, no_member_warnings
      Strictness: from profile
  Libraries Used: flask
       Tools Run: dodgy, mccabe, profile-validator, pycodestyle, pyflakes, pylint, pyroma
  Messages Found: 9264
 External Config: pylint: /home/stephan/src/cffconvert/setup.cfg         <-------------------- HERE

One attempt at fixing this could perhaps be to move project setup to pyproject.toml.

sdruskat commented 1 year ago

This is actually a bug in prospector: https://github.com/PyCQA/prospector/issues/525.

jspaaks commented 1 year ago

Fixed in https://github.com/citation-file-format/cff-converter-python/tree/4d18e5578c0216266d7faa866237c1ce50b97934, closing