Skip to content

lint code

lint code #35

Triggered via push March 14, 2024 09:51
Status Success
Total duration 40s
Billable time 2m
Artifacts

style.yml

on: push
Run linters
14s
Run linters
Check for License headers
7s
Check for License headers
Fit to window
Zoom out
Zoom in

Annotations

32 errors and 3 warnings
/home/runner/work/seal5/seal5/examples/demo.py#L46
seal5_flow.clean(temp=True, patches=True, models=True, inputs=True, interactive=INTERACTIVE) # Clone LLVM and init seal5 metadata directory seal5_flow.initialize( clone=True, - clone_url="[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git" - if PREPATCHED - else "https://github.com/llvm/llvm-project.git", + clone_url=( + "[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git" + if PREPATCHED + else "https://github.com/llvm/llvm-project.git" + ), # clone_ref="llvmorg-17.0.6", clone_ref="seal5-demo-prepatched" if PREPATCHED else "llvmorg-18.1.0-rc3", force=True, verbose=VERBOSE, )
/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L112
artifacts[set_name] = [] metrics["n_sets"] += 1 ext_settings = set_def.settings set_dir = out_path / set_name includes = [] + def process_instrunction(instr_def): metrics["n_instructions"] += 1 input_file = out_path / set_name / f"{instr_def.name}.core_desc" attrs = instr_def.attributes if len(attrs) > 0:
seal5/backends/patterngen/writer.py#L117
Expected 1 blank line before a nested definition, found 0 (E306)
/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L179
metrics["n_failed"] += 1 except AssertionError: metrics["n_failed"] += 1 # errs.append((insn_name, str(ex))) return True + with ThreadPoolExecutor(args.parallel) as executor: futures = [] for instr_def in set_def.instructions.values(): future = executor.submit(process_instrunction, instr_def) futures.append(future)
seal5/backends/riscv_features/writer.py#L27
Line too long (133 > 120 characters) (E501)
/home/runner/work/seal5/seal5/seal5/flow.py#L160
("collect_immediate_operands", passes.collect_immediate_operands, {}), ("collect_operand_types", passes.collect_operand_types, {}), ("detect_side_effects", passes.detect_side_effects, {}), ("detect_inouts", passes.detect_inouts, {}), ("detect_registers", passes.detect_registers, {}), - ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False}) + ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False}), # TODO: determine static constraints (xlen,...) -> subtargetvmap # detect memory adressing modes # self.detect_adressing_modes(verbose) # TODO # detect legal GMIR ops (and map to selectiondag?) # self.detect_legal_ops(verbose=verbose) # TODO
seal5/backends/riscv_features/writer.py#L29
Line too long (150 > 120 characters) (E501)
/home/runner/work/seal5/seal5/seal5/pass_list.py#L804
if gen_index_file: index_file = settings.temp_dir / (new_name + "_tblgen_patterns_index.yml") args.extend(["--index", index_file]) if parallel: import multiprocessing + num_threads = multiprocessing.cpu_count() args.extend(["--parallel", str(num_threads)]) utils.python( "-m", "seal5.backends.patterngen.writer",
seal5/backends/riscv_instr_info/writer.py#L32
Line too long (135 > 120 characters) (E501)
seal5/backends/riscv_instr_info/writer.py#L34
Line too long (152 > 120 characters) (E501)
seal5/frontends/coredsl2_seal5/architecture_model_builder.py#L273
Whitespace before ':' (E203)
seal5/frontends/coredsl2_seal5/behavior_model_builder.py#L340
Whitespace before ':' (E203)
seal5/resources/lit.cfg.py#L7
'lit.llvm.llvm_config' imported but unused (F401)
seal5/resources/lit.cfg.py#L10
Undefined name 'config' (F821)
seal5/resources/lit.cfg.py#L14
Undefined name 'config' (F821)
seal5/resources/lit.cfg.py#L18
Undefined name 'config' (F821)
seal5/backends/patterngen/writer.py#L117
Expected 1 blank line before a nested definition, found 0 (E306)
seal5/backends/riscv_features/writer.py#L27
Line too long (133 > 120 characters) (E501)
seal5/backends/riscv_features/writer.py#L29
Line too long (150 > 120 characters) (E501)
/home/runner/work/seal5/seal5/examples/demo.py#L46
seal5_flow.clean(temp=True, patches=True, models=True, inputs=True, interactive=INTERACTIVE) # Clone LLVM and init seal5 metadata directory seal5_flow.initialize( clone=True, - clone_url="[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git" - if PREPATCHED - else "https://github.com/llvm/llvm-project.git", + clone_url=( + "[email protected]:de-tum-ei-eda-esl/llvm/core-v-llvm-project.git" + if PREPATCHED + else "https://github.com/llvm/llvm-project.git" + ), # clone_ref="llvmorg-17.0.6", clone_ref="seal5-demo-prepatched" if PREPATCHED else "llvmorg-18.1.0-rc3", force=True, verbose=VERBOSE, )
seal5/backends/riscv_instr_info/writer.py#L32
Line too long (135 > 120 characters) (E501)
/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L112
artifacts[set_name] = [] metrics["n_sets"] += 1 ext_settings = set_def.settings set_dir = out_path / set_name includes = [] + def process_instrunction(instr_def): metrics["n_instructions"] += 1 input_file = out_path / set_name / f"{instr_def.name}.core_desc" attrs = instr_def.attributes if len(attrs) > 0:
seal5/backends/riscv_instr_info/writer.py#L34
Line too long (152 > 120 characters) (E501)
/home/runner/work/seal5/seal5/seal5/backends/patterngen/writer.py#L179
metrics["n_failed"] += 1 except AssertionError: metrics["n_failed"] += 1 # errs.append((insn_name, str(ex))) return True + with ThreadPoolExecutor(args.parallel) as executor: futures = [] for instr_def in set_def.instructions.values(): future = executor.submit(process_instrunction, instr_def) futures.append(future)
seal5/frontends/coredsl2_seal5/architecture_model_builder.py#L273
Whitespace before ':' (E203)
/home/runner/work/seal5/seal5/seal5/flow.py#L160
("collect_immediate_operands", passes.collect_immediate_operands, {}), ("collect_operand_types", passes.collect_operand_types, {}), ("detect_side_effects", passes.detect_side_effects, {}), ("detect_inouts", passes.detect_inouts, {}), ("detect_registers", passes.detect_registers, {}), - ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False}) + ("write_cdsl_full", passes.write_cdsl, {"split": False, "compat": False}), # TODO: determine static constraints (xlen,...) -> subtargetvmap # detect memory adressing modes # self.detect_adressing_modes(verbose) # TODO # detect legal GMIR ops (and map to selectiondag?) # self.detect_legal_ops(verbose=verbose) # TODO
seal5/frontends/coredsl2_seal5/behavior_model_builder.py#L340
Whitespace before ':' (E203)
/home/runner/work/seal5/seal5/seal5/pass_list.py#L804
if gen_index_file: index_file = settings.temp_dir / (new_name + "_tblgen_patterns_index.yml") args.extend(["--index", index_file]) if parallel: import multiprocessing + num_threads = multiprocessing.cpu_count() args.extend(["--parallel", str(num_threads)]) utils.python( "-m", "seal5.backends.patterngen.writer",
seal5/resources/lit.cfg.py#L7
'lit.llvm.llvm_config' imported but unused (F401)
seal5/resources/lit.cfg.py#L10
Undefined name 'config' (F821)
seal5/resources/lit.cfg.py#L14
Undefined name 'config' (F821)
seal5/resources/lit.cfg.py#L18
Undefined name 'config' (F821)
Run linters
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, wearerequired/lint-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Run linters
The following actions uses node12 which is deprecated and will be forced to run on node16: wearerequired/lint-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Check for License headers
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.