# Copyright 2024, The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
import argparse import logging import os import signal import sys import tempfile
from edit_monitor import daemon_manager, edit_monitor
def create_arg_parser(): """Creates an instance of the default arg parser."""
parser = argparse.ArgumentParser(
description=( 'Monitors edits in Android source code and uploads the edit logs.'
),
add_help=True,
formatter_class=argparse.RawDescriptionHelpFormatter,
)
parser.add_argument( '--path',
type=str,
required=True,
help='Root path to monitor the edit events.',
)
parser.add_argument( '--dry_run',
action='store_true',
help='Dry run the edit monitor. This starts the edit monitor process without actually send the edit logs to clearcut.',
)
parser.add_argument( '--force_cleanup',
action='store_true',
help=( 'Instead of start a new edit monitor, force stop all existing edit' ' monitors in the system. This option is only used in emergent cases' ' when we want to prevent user damage by the edit monitor.'
),
)
parser.add_argument( '--verbose',
action='store_true',
help=( 'Log verbose info in the log file for debugging purpose.'
),
)
parser.add_argument( '--ignore_file_pattern',
action='append',
dest='ignore_file_patterns',
type=str,
help='Patterns to ignore. Can be specified multiple times.',
)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.