google / grr

GRR Rapid Response: remote live forensics for incident response
https://grr-doc.readthedocs.io/
Apache License 2.0
4.75k stars 762 forks source link

GitHub Action to lint Python code #936

Closed cclauss closed 1 year ago

cclauss commented 3 years ago

Output: https://github.com/cclauss/grr/actions

Fixes undefined name client_utils_common

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./grr/core/executables/python_hacks/shutdown_host.py:23:47: F821 undefined name 'client_utils_common'
    stdout, stderr, exit_status, time_taken = client_utils_common.Execute(
                                              ^
./grr/core/executables/python_hacks/modify_network.py:31:9: F821 undefined name 'client_utils_common'
  res = client_utils_common.Execute(
        ^
./grr/core/executables/python_hacks/modify_network.py:51:13: F821 undefined name 'client_utils_common'
      res = client_utils_common.Execute(
            ^
./grr/core/executables/python_hacks/modify_network.py:66:9: F821 undefined name 'client_utils_common'
  res = client_utils_common.Execute(
        ^
./grr/core/executables/python_hacks/modify_network.py:95:13: F821 undefined name 'client_utils_common'
      res = client_utils_common.Execute(
            ^

Also see #937

cclauss commented 3 years ago

@panhania Undefined names can also be missing imports.