default_no_descriptions.toml (1022B)
1 # these will be ran in *parallel 2 # (gthreads) 3 4 [ratchet.regex.exceptions] 5 regex = "except:" 6 valid = [ 7 """try: 8 x = 1 9 except ValueError: 10 pass""", 11 """try: 12 do_something() 13 except (IOError, ValueError): 14 handle()""" 15 ] 16 invalid = [ 17 """ 18 try: 19 pass 20 except: 21 pass""", 22 """try: 23 dangerous() 24 except: 25 recover()""" 26 ] 27 28 29 [ratchet.regex.lightning] 30 regex = "import pytorch_lightning|from pytorch_lightning" 31 valid = ["import torch", "from my_project import Trainer"] 32 invalid = ["import pytorch_lightning", "from pytorch_lightning import LightningModule"] 33 34 35 [ratchet.regex.tabs] 36 regex = "\\t" 37 valid = [ 38 """def foo(): 39 return 42""", 40 "print('no tab here')" 41 ] 42 invalid = [ 43 """\tprint('starts with tab')""", 44 """def bar(): 45 \treturn True""" 46 ] 47 48 # printed text is assumed to be failures 49 # each evaluation **must** accept a file path as input 50 # these can be tested by running echo FILEPATH | COMMAND 51 # these will be ran in parallel 52 53 [ratchet.shell.line_too_long] 54 command = "xargs -n1 awk 'length($0) > 88'"