| /third_party/python/Lib/test/ |
| D | test_textwrap.py | 30 def check(self, result, expect): member in BaseTestCase 37 self.check(result, expect) 69 # Check that wrapping the empty string returns an empty list. 74 # Check that the empty string is not indented. 79 # Whitespace munging and end-of-sentence detection 97 self.check(result, expect) 100 self.check(result, '\n'.join(expect)) 118 self.check(wrapper.wrap(text), expect) 125 self.check(wrapper.wrap(text), expect) 128 self.check(wrapper.wrap(text), expect) [all …]
|
| D | test_tabnanny.py | 4 * errored : Whitespace related problems present in file. 146 """Testing tabnanny.check().""" 153 """Common verification for tabnanny.check(). 156 running tabnanny.check() on given `dir` or `file` path. Because 157 tabnanny.check() captures exceptions and writes to `stdout` and 161 tabnanny.check(dir_or_file) 187 tabnanny.check(tmp_dir) 211 err = "('EOF in multi-line statement', (7, 0))\n" 262 """A python source code without any whitespace related problems.""" 270 """A python source code with whitespace related sampled problems.""" [all …]
|
| /third_party/python/Tools/scripts/ |
| D | patchcheck.py | 2 """Check proposed changes for common issues.""" 15 # don't check their coding style 49 cmd = "git rev-parse --abbrev-ref HEAD".split() 54 encoding='UTF-8') 64 cmd = "git remote get-url upstream".split() 69 encoding='UTF-8') 87 encoding='UTF-8', 122 # We just use an existence check here as: 126 cmd = 'git diff --name-status ' + base_branch 128 cmd = 'git status --porcelain' [all …]
|
| /third_party/python/Lib/ |
| D | tabnanny.py | 5 tabnanny -- Detection of ambiguous indentation 9 check() described below. 19 # XXX script-like. This will be addressed later. 27 __all__ = ["check", "NannyNag", "process_tokens"] 49 if o == '-q': 51 if o == '-v': 54 errprint("Usage:", sys.argv[0], "[-v] file_or_directory ...") 57 check(arg) 62 Captured and handled in check(). 73 def check(file): function [all …]
|
| D | textwrap.py | 4 # Copyright (C) 1999-2001 Gregory P. Ward. 12 # Hardcode the recognized whitespace characters to the US-ASCII 13 # whitespace characters. The main reason for doing this is that 14 # some Unicode spaces (like \u00a0) are non-breaking whitespaces. 43 Replace all whitespace characters in the input text by spaces 48 Ensure that sentence-ending punctuation is always followed 59 Drop leading and trailing whitespace from lines. 69 # text up into word-wrappable chunks. E.g. 70 # "Hello there -- you goof-ball, use the -b option!" 72 # Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option! [all …]
|
| /third_party/python/Doc/library/ |
| D | tabnanny.rst | 1 :mod:`tabnanny` --- Detection of ambiguous indentation 9 .. sectionauthor:: Peter Funk <pf@artcom-gmbh.de> 15 -------------- 18 is possible to import it into an IDE and use the function :func:`check` 27 .. function:: check(file_or_dir) 32 is checked for whitespace related problems. The diagnostic messages are 39 ``-v`` option if called as a script. 45 whitespace related problems. This is set to true by the ``-q`` option if called 52 handled in :func:`check`. 57 This function is used by :func:`check` to process tokens generated by the [all …]
|
| /third_party/openssl/util/ |
| D | check-format.pl | 3 # Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved. 4 # Copyright Siemens AG 2019-2022 11 # check-format.pl 12 # - check formatting of C source according to OpenSSL coding style 15 # check-format.pl [-l|--sloppy-len] [-l|--sloppy-bodylen] 16 # [-s|--sloppy-space] [-c|--sloppy-comment] 17 # [-m|--sloppy-macro] [-h|--sloppy-hang] 18 # [-e|--eol-comment] [-1|--1-stmt] 21 # run self-tests: 22 # util/check-format.pl util/check-format-test-positives.c [all …]
|
| /third_party/curl/lib/ |
| D | curl_path.c | 21 * SPDX-License-Identifier: curl AND ISC 47 Curl_urldecode(data->state.up.path, 0, &working_path, in Curl_getworkingpath() 55 /* Check for /~/, indicating relative to the user's home directory */ in Curl_getworkingpath() 56 if((data->conn->handler->protocol & CURLPROTO_SCP) && in Curl_getworkingpath() 59 if(Curl_dyn_addn(&npath, &working_path[3], working_path_len - 3)) { in Curl_getworkingpath() 64 else if((data->conn->handler->protocol & CURLPROTO_SFTP) && in Curl_getworkingpath() 78 if(len && (p[len-1] != '/')) in Curl_getworkingpath() 82 &working_path[copyfrom], working_path_len - copyfrom)) { in Curl_getworkingpath() 104 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 126 static const char WHITESPACE[] = " \t\r\n"; in Curl_get_pathname() local [all …]
|
| /third_party/vk-gl-cts/external/amber/src/tools/ |
| D | copyright.py | 8 # http://www.apache.org/licenses/LICENSE-2.0 18 usage: copyright.py [--check] 20 With --check, prints out all the files missing the copyright notice and exits 40 http://www.apache.org/licenses/LICENSE-2.0 64 """Returns glob-matching filenames under the current directory, but skips 71 """Returns true if line is all whitespace or shebang.""" 77 """Returns commented-out text. 80 trailing whitespace will be trimmed. 89 """Finds all glob-matching files under the current directory and inserts the 92 The copyright message goes into the first non-whitespace, non-shebang line [all …]
|
| /third_party/icu/icu4c/source/tools/toolutil/ |
| D | pkg_icu.cpp | 4 * Copyright (C) 2008-2015, International Business Machines 22 // read a file list -------------------------------------------------------- *** 35 /* check for multiple text file suffixes to see if this list name is a text file name */ 44 if((listNameEnd-listname)>length && 0==memcmp(listNameEnd-length, suffix, length)) { in isListTextFile() 56 * Otherwise, read the file itself as a single-item list. 99 while(line<end && (*(end-1)=='\r' || *(end-1)=='\n')) { in readList() 100 *--end=0; in readList() 104 // check first non-whitespace character and in readList() 112 // take whitespace-separated items from the line in readList() 114 // find whitespace after the item or the end of the line in readList() [all …]
|
| /third_party/skia/third_party/externals/icu/source/tools/toolutil/ |
| D | pkg_icu.cpp | 4 * Copyright (C) 2008-2015, International Business Machines 22 // read a file list -------------------------------------------------------- *** 35 /* check for multiple text file suffixes to see if this list name is a text file name */ 44 if((listNameEnd-listname)>length && 0==memcmp(listNameEnd-length, suffix, length)) { in isListTextFile() 56 * Otherwise, read the file itself as a single-item list. 99 while(line<end && (*(end-1)=='\r' || *(end-1)=='\n')) { in readList() 100 *--end=0; in readList() 104 // check first non-whitespace character and in readList() 112 // take whitespace-separated items from the line in readList() 114 // find whitespace after the item or the end of the line in readList() [all …]
|
| /third_party/python/Lib/distutils/ |
| D | text_file.py | 11 """Provides a file-like object that takes care of all the things you 13 line-by-line syntax: strip comments (as long as "#" is your 16 leading and/or trailing whitespace. All of these are optional 22 implementing line-at-a-time lookahead. 38 strip from "#" to end-of-line, as well as any whitespace 39 leading up to the "#" -- unless it is escaped by a backslash 41 strip leading whitespace from each line before returning it 43 strip trailing whitespace (including line terminator!) from 47 whitespace. (If both lstrip_ws and rstrip_ws are false, 48 then some lines may consist of solely whitespace: these will [all …]
|
| /third_party/skia/third_party/externals/freetype/src/type1/ |
| D | t1parse.c | 7 * Copyright (C) 1996-2021 by 23 * - provide an implementation of a growing sequence of objects called 26 * - opening .pfb and .pfa files to extract their top-level and private 29 * - read numbers, arrays & strings from any dictionary. 123 if ( ft_memcmp( stream->cursor, header_string, header_length ) != 0 ) in check_type1_format() 145 psaux->ps_parser_funcs->init( &parser->root, NULL, NULL, memory ); in T1_New_Parser() 147 parser->stream = stream; in T1_New_Parser() 148 parser->base_len = 0; in T1_New_Parser() 149 parser->base_dict = NULL; in T1_New_Parser() 150 parser->private_len = 0; in T1_New_Parser() [all …]
|
| /third_party/icu/icu4c/source/i18n/ |
| D | numparse_types.h | 18 // Forward-declarations 75 return UnicodeString(true, fBuffer.getAlias(), -1); in toAliasedUnicodeString() 79 // Use the alias-only constructor and then call UnicodeString operator== 89 * Struct-like class to hold the results of a parsing routine. 105 … * "weak" chars, like whitespace, change the offset, but the charsConsumed is not touched until a 141 * "weak", like whitespace. 147 …* though there are matchers that accept whitespace. In this example, the digits are strong, whereas 148 …* the whitespace is weak. Grouping separators are weak, whereas decimal separators are strong. Most 156 /** Apply certain number-related flags to the DecimalQuantity. */ 179 …* applied multiple times. If there is, the non-greedy parsing algorithm will be unhappy and may en… [all …]
|
| D | smpdtfst.cpp | 5 * Copyright (C) 2009-2013, International Business Machines Corporation and * 40 fDateIgnorables = new UnicodeSet(UNICODE_STRING("[-,./[:whitespace:]]", 20), status); in SimpleDateFormatStaticSets() 41 fTimeIgnorables = new UnicodeSet(UNICODE_STRING("[-.:[:whitespace:]]", 19), status); in SimpleDateFormatStaticSets() 42 fOtherIgnorables = new UnicodeSet(UNICODE_STRING("[:whitespace:]", 14), status); in SimpleDateFormatStaticSets() 44 // Check for null pointers in SimpleDateFormatStaticSets() 50 fDateIgnorables->freeze(); in SimpleDateFormatStaticSets() 51 fTimeIgnorables->freeze(); in SimpleDateFormatStaticSets() 52 fOtherIgnorables->freeze(); in SimpleDateFormatStaticSets() 72 //------------------------------------------------------------------------------ 77 //------------------------------------------------------------------------------ [all …]
|
| /third_party/skia/third_party/externals/icu/source/i18n/ |
| D | numparse_types.h | 18 // Forward-declarations 75 return UnicodeString(true, fBuffer.getAlias(), -1); in toAliasedUnicodeString() 79 // Use the alias-only constructor and then call UnicodeString operator== 89 * Struct-like class to hold the results of a parsing routine. 105 … * "weak" chars, like whitespace, change the offset, but the charsConsumed is not touched until a 141 * "weak", like whitespace. 147 …* though there are matchers that accept whitespace. In this example, the digits are strong, whereas 148 …* the whitespace is weak. Grouping separators are weak, whereas decimal separators are strong. Most 156 /** Apply certain number-related flags to the DecimalQuantity. */ 179 …* applied multiple times. If there is, the non-greedy parsing algorithm will be unhappy and may en… [all …]
|
| D | smpdtfst.cpp | 5 * Copyright (C) 2009-2013, International Business Machines Corporation and * 40 fDateIgnorables = new UnicodeSet(UNICODE_STRING("[-,./[:whitespace:]]", 20), status); in SimpleDateFormatStaticSets() 41 fTimeIgnorables = new UnicodeSet(UNICODE_STRING("[-.:[:whitespace:]]", 19), status); in SimpleDateFormatStaticSets() 42 fOtherIgnorables = new UnicodeSet(UNICODE_STRING("[:whitespace:]", 14), status); in SimpleDateFormatStaticSets() 44 // Check for null pointers in SimpleDateFormatStaticSets() 50 fDateIgnorables->freeze(); in SimpleDateFormatStaticSets() 51 fTimeIgnorables->freeze(); in SimpleDateFormatStaticSets() 52 fOtherIgnorables->freeze(); in SimpleDateFormatStaticSets() 72 //------------------------------------------------------------------------------ 77 //------------------------------------------------------------------------------ [all …]
|
| /third_party/json/docs/mkdocs/scripts/ |
| D | check_structure.py | 27 'Non-member functions', 51 section_idx = -1 # the index of the current h2 section 66 # there should only be one top-level title 68 …report('structure/unexpected_section', f'{file}:{lineno+1}', f'unexpected top-level title "{line}"… 77 …report('whitespace/line_length', f'{file}:{lineno+1} ({current_section})', f'line is too long ({le… 79 # sections in `<!-- NOLINT -->` comments are treated as present 80 if line.startswith('<!-- NOLINT'): 81 current_section = line.strip('<!-- NOLINT') 82 current_section = current_section.strip(' -->') 85 # check if sections are correct [all …]
|
| /third_party/mindspore/mindspore-src/source/scripts/pre_commit/githooks/ |
| D | pre-push | 8 # http://www.apache.org/licenses/LICENSE-2.0 20 CURR_DIR=$(dirname "${BASH_SOURCE-$0}") 22 cd -P "${CURR_DIR}" || exit 23 pwd -P 26 cd -P "${CURR_DIR}/../../../" || exit 27 pwd -P 30 cd -P "${CURR_DIR}/../../../../" || exit 31 pwd -P 35 uname_s=$(uname -s) 41 elif [ "$os_name" == "MINGW" ]; then # MINGW, windows, git-bash [all …]
|
| /third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/parse/ |
| D | ParsedNumber.java | 12 * Struct-like class to hold the results of a parsing routine. 27 … * "weak" chars, like whitespace, change the offset, but the charsConsumed is not touched until a 66 return o1.charEnd - o2.charEnd; 99 * "weak", like whitespace. 105 …* though there are matchers that accept whitespace. In this example, the digits are strong, whereas 106 …* the whitespace is weak. Grouping separators are weak, whereas decimal separators are strong. Most 116 /** Apply certain number-related flags to the DecimalQuantity. */ 146 // Check for NaN, infinity, and -0.0 in getNumber() 159 return -0.0; in getNumber()
|
| /third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/ |
| D | ParsedNumber.java | 11 * Struct-like class to hold the results of a parsing routine. 25 … * "weak" chars, like whitespace, change the offset, but the charsConsumed is not touched until a 64 return o1.charEnd - o2.charEnd; 97 * "weak", like whitespace. 103 …* though there are matchers that accept whitespace. In this example, the digits are strong, whereas 104 …* the whitespace is weak. Grouping separators are weak, whereas decimal separators are strong. Most 114 /** Apply certain number-related flags to the DecimalQuantity. */ 144 // Check for NaN, infinity, and -0.0 in getNumber() 157 return -0.0; in getNumber()
|
| /third_party/libinput/ |
| D | .pre-commit-config.yaml | 2 - repo: https://github.com/pre-commit/pre-commit-hooks 5 - id: end-of-file-fixer 6 - id: trailing-whitespace 7 - id: no-commit-to-branch 8 args: ['--branch', 'main'] 9 - repo: https://github.com/psf/black 12 - id: black 13 args: ['--check', '--diff', '.'] 14 - repo: https://github.com/charliermarsh/ruff-pre-commit 17 - id: ruff [all …]
|
| /third_party/PyYAML/lib/yaml/ |
| D | emitter.py | 3 # stream ::= STREAM-START document* STREAM-END 4 # document ::= DOCUMENT-START node DOCUMENT-END 6 # sequence ::= SEQUENCE-START node* SEQUENCE-END 7 # mapping ::= MAPPING-START (node node)* MAPPING-END 44 # Encoding can be overridden by STREAM-START. 70 # - current position. 71 # - is it a whitespace? 72 # - is it an indention character 73 # (indentation space, '-', '?', or ':')? 76 self.whitespace = True [all …]
|
| /third_party/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ |
| D | IcuDataDumper.java | 5 import static com.google.common.base.CharMatcher.whitespace; 59 throw new IllegalArgumentException("Usage: <file-or-dir> [<name-pattern>]"); in main() 66 "cannot specificy a name pattern for a non-directory file: %s", fileOrDir); in main() 75 f -> name.map(n -> n.matcher(f.getFileName().toString()).matches()).orElse(true); in walkDirectory() 102 .forEach(k -> System.out.println(k + " :: " + LIST_JOINER.join(allPaths.get(k)))); in dump() 116 // Current line number (1-indexed). 122 // True when in the final top-level group at the end of parsing. 130 // Current partially read value of a multi-line value. 132 // Map of indices used to auto-generate names for anonymous path segments. 133 // TODO: Check if this is even needed and remove if not. [all …]
|
| /third_party/ltp/testcases/kernel/hotplug/memory_hotplug/ |
| D | commands.c | 2 * memtoy: commands.c - command line interface 11 * Copyright (c) 2005 Hewlett-Packard, Inc 28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 68 if (mask->n[node / (8 * sizeof(unsigned long))] & in nodemask_isset() 76 mask->n[node / (8 * sizeof(unsigned long))] |= in nodemask_set() 80 static char *whitespace = " \t"; variable 84 return nextarg ? nextarg + strspn(nextarg, whitespace) : args + strnlen(args, CMDBUFSZ); in get_next_arg() 93 * required_arg -- check for a required argument; issue message if not there 105 gcp->program_name, gcp->cmd_name, arg_name); in required_arg() 106 help_me(gcp->cmd_name); in required_arg() [all …]
|