priv-kweihmann / multimetric

Calculate code metrics in various languages
zlib License
36 stars 13 forks source link

multimetric chokes on unknown files #31

Closed aylusltd closed 1 year ago

aylusltd commented 2 years ago

Should at least have an option to ignore lexer errors.

This situation should never happen:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/multimetric/__main__.py", line 90, in file_process
    _lexer = lexers.get_lexer_for_filename(_file)
  File "/Users/jason/Library/Python/3.8/lib/python/site-packages/pygments/lexers/__init__.py", line 209, in get_lexer_for_filename
    raise ClassNotFound('no lexer for filename %r found' % _fn)
pygments.util.ClassNotFound: no lexer for filename '/Users/jason/atd/temp_repo/.gitignore' found
"""
lgtm-com[bot] commented 2 years ago

This pull request introduces 3 alerts when merging 873440f28fbdbe71e6197f45eab48ac45c3ee8e8 into 2ddf0e2b7318f3a091827842fec3ef51338d0064 - view on LGTM.com

new alerts:

lgtm-com[bot] commented 2 years ago

This pull request introduces 3 alerts when merging 5a2d7ff99b3bbb7ccb06ee65cf9bb4cda9277086 into 2ddf0e2b7318f3a091827842fec3ef51338d0064 - view on LGTM.com

new alerts:

lgtm-com[bot] commented 1 year ago

This pull request introduces 3 alerts when merging e9af5e875b41279c5a0cbac62220a5ea48e53cf7 into 2ddf0e2b7318f3a091827842fec3ef51338d0064 - view on LGTM.com

new alerts:

aylusltd commented 1 year ago

Sorry for the delay, @priv-kweihmann everything should be updated now.