# $Id: .scm-settings $
## @file
# Source code massager settings for the EFI Firmware.
#

#
# Copyright (C) 2017-2020 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#


/*:     --external-copyright --dont-set-svn-keywords --no-convert-tabs --no-strip-trailing-blanks \
        --strip-no-trailing-lines --no-force-final-eol --no-fix-todos --no-fix-header-guards

/.scm-settings: --no-external-copyright --set-svn-keywords --convert-tabs --strip-trailing-blanks --strip-trailing-lines \
        --force-final-eol --fix-todos --license-ose-gpl

/*.kmk: --no-external-copyright --set-svn-keywords --convert-tabs --strip-trailing-blanks --strip-trailing-lines \
        --force-final-eol --fix-todos --license-ose-dual

/MdeModulePkg/Universal/Disk/PartitionDxe/Apple.c: \
        --no-external-copyright --set-svn-keywords --convert-tabs --strip-trailing-blanks --strip-trailing-lines \
        --force-final-eol --fix-todos --license-ose-dual

/VBox*: --no-external-copyright --set-svn-keywords --convert-tabs --strip-trailing-blanks --strip-trailing-lines \
        --force-final-eol --fix-todos --license-ose-dual


# Build related files using '#' for comments.
/*.dec:        --treat-as Makefile
/*.dsc:        --treat-as Makefile
/*.fdf:        --treat-as Makefile
/*.inf:        --treat-as Makefile
/BaseTools/Conf/build_rule.template:   --treat-as Makefile
/BaseTools/Conf/target.template:       --treat-as Makefile
/BaseTools/Conf/tools_def.template:    --treat-as Makefile

# IASL sources.
/*.asl:        --treat-as *.h
/*.aslc:       --treat-as *.h

# NASM source.
/*.nasm:       --treat-as .asm
/*.nasmb:      --treat-as .asm
/*.asm16:      --treat-as .asm

# cpp processed assembly files.
/*.s:          --treat-as .h
/*.i:          --treat-as .h

# GAS assembly files w/o preprocessing.
/*.S:          --treat-as Makefile

# Not quite sure what this is, uses C++ comment style.
/*.vfr:        --treat-as .h
/*.Vfr:        --treat-as .h

# Linker scripts.
/*-ld-script:  --treat-as .h

# Grammar files. Treat as C for now.
/*.g:          --treat-as .c

# Not entirely sure what the .dlg files are, but they seems to contain C like license headers.
/*.dlg:        --treat-as .h

# Misc.
*.xsd:                  --treat-as .xml
/*.ini:        --treat-as Makefile
/BaseTools/Conf/FrameworkDatabase.template:    --treat-as .xml
/BaseTools/Source/C/VfrCompile/Pccts/*.r:      --treat-as .h
/BaseTools/BuildEnv:                           --treat-as .sh

# Some normal makefiles (external code, convenience, ...)
/*.mak:        --treat-as Makefile
/*/makefile1:  --treat-as Makefile
/*/makefile.cygwin:                            --treat-as Makefile
/*/makefile.old:                               --treat-as Makefile
/BaseTools/Source/C/Makefiles/*.makefile:      --treat-as Makefile
/BaseTools/Source/C/Makefiles/ms.*:            --treat-as Makefile

# Ignore text files, usually no license stuff there.
--filter-out-files *.txt
--filter-out-files *.rtf
--filter-out-files *.1
--filter-out-files /*/README
--filter-out-files /BaseTools/Source/C/VfrCompile/Pccts/MPW_Read_Me
--filter-out-files /BaseTools/Source/C/VfrCompile/Pccts/NOTES.bcc
--filter-out-files /BaseTools/Source/C/VfrCompile/Pccts/NOTES.msvc
--filter-out-files /BaseTools/Source/C/VfrCompile/Pccts/RIGHTS
--filter-out-files /ReadMe.vbox

# Ignore binary files.
--filter-out-files *.raw
--filter-out-files *.efi
--filter-out-files *.bin
--filter-out-files *.obj
--filter-out-files *.dll
--filter-out-files *.docx

# The .uni files are UTF-16LE encoded and scm doesn't grok that yet.
--filter-out-files *.uni

# Ignore patches.
--filter-out-files *.patch

# Ignore visual C++ project stuff.
--filter-out-files *.sln
--filter-out-files *.suo
--filter-out-files *.vcproj

# Misc
--filter-out-files */.gitignore
--filter-out-files *.ps
--filter-out-files /BaseTools/Source/Python/Rsa2048Sha256Sign/TestSigningPrivateKey.pem
--filter-out-dirs  /StdLib/Efi/StdLib/etc/.

# @todo Temporary until openssl is updated and we can cleanup the eol style mess
--filter-out-dirs  /CryptoPkg/Library/OpensslLib/.

#
# VBoxPkg
#
/VBoxPkg/VBoxFsDxe/test/*: --external-copyright --no-strip-trailing-blanks --no-fix-todos --strip-no-trailing-lines
/VBoxPkg/VBoxVgaMiniPortDxe/VBoxVgaFont*.h: --external-copyright
/VBoxPkg/E1kNetDxe/*.*: --external-copyright

#/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxVgaDxe/Edid.c: --no-convert-tabs
#/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/*.*: --no-convert-tabs
#/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxVgaDxe/Edid.c: --dont-set-svn-keywords
#/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/*.*: --dont-set-svn-keywords

