audk/BaseTools/Scripts
Michael D Kinney 6d571c0070 BaseTools/Scripts/PatchCheck: Error if commit modifies multiple packages
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4679

Update PatchCheck.py to evaluate all the files modified in each commit
and generate an error if:
* A commit adds/modifies files in multiple package directories
* A commit adds/modifies files in multiple non-package directories
* A commit adds/modifies files in both a package and a non-package
  directory
* A commit deletes files from multiple package directories
* A commit deletes files from multiple non-package directories
* A commit deletes files from both a package and a non-package
  directory

Modifications to files in the root of the repository are not
evaluated.

This check is skipped if PatchCheck.py is run on a patch file or
input from stdin because this multiple package commit check depends
on information from a git repository.

If --ignore-multi-package option is set, then reduce the multiple
package commit check from an error to a warning for all commits in
the commit range provided to PatchCheck.py.

Add check for a 'Continuous-integration-options:' commit message
tag that allows one or more options to be specified at the individual
commit scope to enable/disable continuous integration checks. This
tag must start at the beginning of a commit message line and may
appear more than once in a commit message.

Add support for a Continuous-integration-options tag value of
'PatchCheck.ignore-multi-package' that reduces the multiple package
commit check from an error to a warning for the specific commits that
specify this option.  Example:

  Continuous-integration-options: PatchCheck.ignore-multi-package

The set of packages are found by searching for DEC files in a git
repository. The list of DEC files in a git repository is collected
with the following git command:

  git ls-files *.dec

The set of files added/modified by each commit is found using the
following git command:

  git diff-tree --no-commit-id --name-only --diff-filter=AM -r <commit>

The set of files deleted by each commit is found using the
following git command:

  git diff-tree --no-commit-id --name-only --diff-filter=D -r <commit>

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
2024-02-27 19:28:19 +00:00
..
PackageDocumentTools BaseTools: Fix various typos 2019-07-08 08:59:29 +08:00
BinToPcd.py BaseTools: BinToPcd: Resolve xdrlib deprecation 2023-08-02 05:23:00 +00:00
ClangBase.lds BaseTools: make sure the got is empty 2023-06-01 10:53:35 +00:00
ConvertFceToStructurePcd.py BaseTools: Fix StructurePcd offset error. 2021-11-08 03:18:54 +00:00
ConvertMasmToNasm.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
ConvertUni.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
DetectNotUsedItem.py BaseTools:Add DetectNotUsedItem.py to Edk2\BaseTools\Scripts 2019-06-25 09:23:48 +08:00
FormatDosFiles.py BaseTools:"--exclude" don't apply if parameter ends with separator 2019-09-27 08:17:55 +08:00
GccBase.lds BaseTools: make sure the got is empty 2023-06-01 10:53:35 +00:00
GetMaintainer.py BaseTools/Scripts/GetMaintainer: Sort output addresses 2023-11-11 02:31:13 +00:00
GetUtcDateTime.py BaseTools/Scripts: Add GetUtcDateTime script. 2019-08-15 15:49:11 +08:00
MemoryProfileSymbolGen.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
PatchCheck.py BaseTools/Scripts/PatchCheck: Error if commit modifies multiple packages 2024-02-27 19:28:19 +00:00
RunMakefile.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
RunMakefileSample.mak BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
SetVisualStudio.bat BaseTools: Remove VS2008-VS2013 remnants 2023-05-05 11:41:35 +00:00
SetupGit.py BaseTools: Update SetupGit.py to add new 'fp' alias for patch formatting 2023-04-14 14:28:43 +00:00
ShowEnvironment.bat BaseTools: Remove VS2008-VS2013 remnants 2023-05-05 11:41:35 +00:00
SmiHandlerProfileSymbolGen.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
UpdateBuildVersions.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
efi_debugging.py BaseTools: efi_debugging.py: Add debugger agnostic dbg Python Classes 2022-04-09 05:13:56 +00:00
efi_gdb.py BaseTools: Scripts/efi_gdb.py: Add gdb EFI commands and pretty Print 2022-04-09 05:13:56 +00:00
efi_lldb.py BaseTools: Scripts/efi_lldb.py: Add lldb EFI commands and pretty Print 2022-04-09 05:13:56 +00:00