Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
PRESUBMIT Namespace Reference

Functions

 _CheckApiTestFile (input_api, output_api)
 
 CheckChangeOnUpload (input_api, output_api)
 
 CheckChangeOnCommit (input_api, output_api)
 
 _CheckNoBannedFunctions (input_api, output_api)
 
 _CheckUnwantedDependencies (input_api, output_api)
 
 _CheckIncludeOrderForScope (scope, input_api, file_path, changed_linenums)
 
 _CheckIncludeOrderInFile (input_api, f, changed_linenums)
 
 _CheckIncludeOrder (input_api, output_api)
 
 _CheckLibcxxRevision (input_api, output_api)
 
 _CheckTestDuplicates (input_api, output_api)
 
 _CheckPngNames (input_api, output_api)
 
 _CheckUselessForwardDeclarations (input_api, output_api)
 
 ChecksCommon (input_api, output_api)
 
 _CheckPublicHeaders (input_api, output_api)
 

Variables

bool USE_PYTHON3 = True
 
str PRESUBMIT_VERSION = '2.0.0'
 
list LINT_FILTERS
 
tuple _INCLUDE_ORDER_WARNING
 
 _KNOWN_ROBOTS
 
str _THIRD_PARTY = 'third_party/'
 
tuple _BANNED_CPP_FUNCTIONS
 

Detailed Description

Presubmit script for pdfium.

See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.

Function Documentation

◆ _CheckApiTestFile()

PRESUBMIT._CheckApiTestFile ( input_api,
output_api )
protected
Checks that the public headers match the API tests.

Definition at line 14 of file PRESUBMIT.py.

Referenced by CheckChangeOnCommit(), and CheckChangeOnUpload().

+ Here is the caller graph for this function:

◆ _CheckIncludeOrder()

PRESUBMIT._CheckIncludeOrder ( input_api,
output_api )
protected
Checks that the #include order is correct.

1. The corresponding header for source files.
2. C system files in alphabetical order
3. C++ system files in alphabetical order
4. Project's .h files in alphabetical order

Each region separated by #if, #elif, #else, #endif, #define and #undef follows
these rules separately.

Definition at line 351 of file PRESUBMIT.py.

References _CheckIncludeOrderInFile(), and set.

Referenced by ChecksCommon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _CheckIncludeOrderForScope()

PRESUBMIT._CheckIncludeOrderForScope ( scope,
input_api,
file_path,
changed_linenums )
protected
Checks that the lines in scope occur in the right order.

1. C system files in alphabetical order
2. C++ system files in alphabetical order
3. Project's .h files

Definition at line 220 of file PRESUBMIT.py.

Referenced by _CheckIncludeOrderInFile().

+ Here is the caller graph for this function:

◆ _CheckIncludeOrderInFile()

PRESUBMIT._CheckIncludeOrderInFile ( input_api,
f,
changed_linenums )
protected
Checks the #include order for the given file f.

Definition at line 274 of file PRESUBMIT.py.

References _CheckIncludeOrderForScope().

Referenced by _CheckIncludeOrder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _CheckLibcxxRevision()

PRESUBMIT._CheckLibcxxRevision ( input_api,
output_api )
protected
Makes sure that libcxx_revision is set correctly.

Definition at line 375 of file PRESUBMIT.py.

Referenced by ChecksCommon().

+ Here is the caller graph for this function:

◆ _CheckNoBannedFunctions()

PRESUBMIT._CheckNoBannedFunctions ( input_api,
output_api )
protected
Makes sure that banned functions are not used.

Definition at line 79 of file PRESUBMIT.py.

Referenced by ChecksCommon(), and PRESUBMIT_test.BannedTypeCheckTest.testBannedCppFunctions().

+ Here is the caller graph for this function:

◆ _CheckPngNames()

PRESUBMIT._CheckPngNames ( input_api,
output_api )
protected
Checks that .png files have the right file name format, which must be in
the form:

NAME_expected(_gdi)?(_(agg|skia))?(_(linux|mac|win))?.pdf.\d+.png

This must be the same format as the one in testing/corpus's PRESUBMIT.py.

Definition at line 427 of file PRESUBMIT.py.

Referenced by ChecksCommon(), and PRESUBMIT_test.CheckChangeOnUploadTest.testCheckPngNames().

+ Here is the caller graph for this function:

◆ _CheckPublicHeaders()

PRESUBMIT._CheckPublicHeaders ( input_api,
output_api )
protected
Checks that the public headers match the API tests.

Definition at line 14 of file PRESUBMIT.py.

References _CheckPublicHeaders().

Referenced by _CheckPublicHeaders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _CheckTestDuplicates()

PRESUBMIT._CheckTestDuplicates ( input_api,
output_api )
protected
Checks that pixel and javascript tests don't contain duplicates.
We use .in and .pdf files, having both can cause race conditions on the bots,
which run the tests in parallel.

Definition at line 397 of file PRESUBMIT.py.

Referenced by ChecksCommon().

+ Here is the caller graph for this function:

◆ _CheckUnwantedDependencies()

PRESUBMIT._CheckUnwantedDependencies ( input_api,
output_api )
protected
Runs checkdeps on #include statements added in this
change. Breaking - rules is an error, breaking ! rules is a
warning.

Definition at line 150 of file PRESUBMIT.py.

Referenced by ChecksCommon().

+ Here is the caller graph for this function:

◆ _CheckUselessForwardDeclarations()

PRESUBMIT._CheckUselessForwardDeclarations ( input_api,
output_api )
protected
Checks that added or removed lines in non third party affected
   header files do not lead to new useless class or struct forward
   declaration.

Definition at line 449 of file PRESUBMIT.py.

References sum.

Referenced by ChecksCommon().

+ Here is the caller graph for this function:

◆ CheckChangeOnCommit()

PRESUBMIT.CheckChangeOnCommit ( input_api,
output_api )

Definition at line 42 of file PRESUBMIT.py.

References _CheckApiTestFile().

+ Here is the call graph for this function:

◆ CheckChangeOnUpload()

PRESUBMIT.CheckChangeOnUpload ( input_api,
output_api )

Definition at line 36 of file PRESUBMIT.py.

References _CheckApiTestFile().

+ Here is the call graph for this function:

◆ ChecksCommon()

PRESUBMIT.ChecksCommon ( input_api,
output_api )

Definition at line 496 of file PRESUBMIT.py.

References _CheckIncludeOrder(), _CheckLibcxxRevision(), _CheckNoBannedFunctions(), _CheckPngNames(), _CheckTestDuplicates(), _CheckUnwantedDependencies(), and _CheckUselessForwardDeclarations().

+ Here is the call graph for this function:

Variable Documentation

◆ _BANNED_CPP_FUNCTIONS

tuple PRESUBMIT._BANNED_CPP_FUNCTIONS
protected
Initial value:
1= (
2 (
3 r'/\busing namespace ',
4 (
5 'Using directives ("using namespace x") are banned by the Google',
6 'Style Guide (',
7 'https://google.github.io/styleguide/cppguide.html#Namespaces ).',
8 'Explicitly qualify symbols or use using declarations ("using',
9 'x::foo").',
10 ),
11 True,
12 [_THIRD_PARTY],
13 ),
14 (
15 r'/v8::Isolate::(?:|Try)GetCurrent()',
16 (
17 'v8::Isolate::GetCurrent() and v8::Isolate::TryGetCurrent() are',
18 'banned. Hold a pointer to the v8::Isolate that was entered. Use',
19 'v8::Isolate::IsCurrent() to check whether a given v8::Isolate is',
20 'entered.',
21 ),
22 True,
23 (),
24 ),
25)

Definition at line 52 of file PRESUBMIT.py.

◆ _INCLUDE_ORDER_WARNING

tuple PRESUBMIT._INCLUDE_ORDER_WARNING
protected
Initial value:
1= (
2 'Your #include order seems to be broken. Remember to use the right '
3 'collation (LC_COLLATE=C) and check\nhttps://google.github.io/styleguide/'
4 'cppguide.html#Names_and_Order_of_Includes')

Definition at line 35 of file PRESUBMIT.py.

◆ _KNOWN_ROBOTS

PRESUBMIT._KNOWN_ROBOTS
protected
Initial value:
1= set() | set(
2 '%s@skia-public.iam.gserviceaccount.com' % s for s in ('pdfium-autoroll',))
QFuture< QSet< QChar > > set
[10]

Definition at line 42 of file PRESUBMIT.py.

◆ _THIRD_PARTY

str PRESUBMIT._THIRD_PARTY = 'third_party/'
protected

Definition at line 45 of file PRESUBMIT.py.

◆ LINT_FILTERS

list PRESUBMIT.LINT_FILTERS
Initial value:
1= [
2 # Rvalue ref checks are unreliable.
3 '-build/c++11',
4 # Need to fix header names not matching cpp names.
5 '-build/include_order',
6 # Too many to fix at the moment.
7 '-readability/casting',
8 # Need to refactor large methods to fix.
9 '-readability/fn_size',
10 # Lots of usage to fix first.
11 '-runtime/int',
12 # Lots of non-const references need to be fixed
13 '-runtime/references',
14 # We are not thread safe, so this will never pass.
15 '-runtime/threadsafe_fn',
16 # Figure out how to deal with #defines that git cl format creates.
17 '-whitespace/indent',
18]

Definition at line 15 of file PRESUBMIT.py.

◆ PRESUBMIT_VERSION

str PRESUBMIT.PRESUBMIT_VERSION = '2.0.0'

Definition at line 11 of file PRESUBMIT.py.

◆ USE_PYTHON3

bool PRESUBMIT.USE_PYTHON3 = True

Definition at line 11 of file PRESUBMIT.py.