pw_presubmit: Remove init steps

Remove unused init_cipd and init_virtualenv steps and create lintformat
program.

Change-Id: I4b8d67c2545a6e6d9b7a2fb19b68fc3ee3b19338
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/33760
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index f77d262..cade0aa 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -34,7 +34,7 @@
 
 import pw_package.pigweed_packages
 
-from pw_presubmit import build, cli, environment, format_code, git_repo
+from pw_presubmit import build, cli, format_code, git_repo
 from pw_presubmit import call, filter_paths, plural, PresubmitContext
 from pw_presubmit import PresubmitFailure, Programs
 from pw_presubmit.install_hook import install_hook
@@ -43,25 +43,6 @@
 
 pw_package.pigweed_packages.initialize()
 
-
-#
-# Initialization
-#
-def init_cipd(ctx: PresubmitContext):
-    environment.init_cipd(ctx.root, ctx.output_dir)
-
-
-def init_virtualenv(ctx: PresubmitContext):
-    environment.init_virtualenv(
-        ctx.root,
-        ctx.output_dir,
-        gn_targets=(
-            f'{ctx.root}#:python.install',
-            f'{ctx.root}#:target_support_packages.install',
-        ),
-    )
-
-
 # Trigger builds if files with these extensions change.
 _BUILD_EXTENSIONS = ('.py', '.rst', '.gn', '.gni',
                      *format_code.C_FORMAT.extensions)
@@ -515,12 +496,16 @@
     gn_nanopb_build,
 )
 
-QUICK = (
+LINTFORMAT = (
     commit_message_format,
-    source_is_in_build_files,
     copyright_notice,
     format_code.presubmit_checks(),
     pw_presubmit.pragma_once,
+    source_is_in_build_files,
+)
+
+QUICK = (
+    LINTFORMAT,
     gn_quick_build_check,
     # TODO(pwbug/141): Re-enable CMake and Bazel for Mac after we have fixed the
     # the clang issues. The problem is that all clang++ invocations need the
@@ -529,12 +514,7 @@
 )
 
 FULL = (
-    commit_message_format,
-    init_cipd,
-    init_virtualenv,
-    copyright_notice,
-    format_code.presubmit_checks(),
-    pw_presubmit.pragma_once,
+    LINTFORMAT,
     gn_clang_build,
     gn_arm_build,
     gn_docs_build,
@@ -553,7 +533,12 @@
     gn_teensy_build if sys.platform in ['linux', 'darwin'] else (),
 )
 
-PROGRAMS = Programs(broken=BROKEN, quick=QUICK, full=FULL)
+PROGRAMS = Programs(
+    broken=BROKEN,
+    quick=QUICK,
+    full=FULL,
+    lintformat=LINTFORMAT,
+)
 
 
 def parse_args() -> argparse.Namespace: