Home
last modified time | relevance | path

Searched +full:check +full:- +full:whitespace (Results 1 – 25 of 1060) sorted by relevance

12345678910>>...43

/third_party/python/Lib/test/
Dtest_textwrap.py30 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 …]
/third_party/python/Tools/scripts/
Dpatchcheck.py2 """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/rust/rust/src/tools/rust-analyzer/crates/ide/src/
Dsyntax_tree.rs12 // rust-analyzer itself.
17 // | VS Code | **rust-analyzer: Show Syntax Tree**
19 // image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b1-11eb-9507-fee6…
24 ) -> String { in syntax_tree()
45 fn syntax_tree_for_string(token: &SyntaxToken, text_range: TextRange) -> Option<String> { in syntax_tree_for_string()
55 fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option<String> { in syntax_tree_for_token()
63 let start = text_range.start() - node_range.start(); in syntax_tree_for_token()
77 if start + len < TextSize::of(&text) { start + len } else { TextSize::of(&text) - start }; in syntax_tree_for_token()
110 fn check(ra_fixture: &str, expect: expect_test::Expect) { in check() function
124 check( in test_syntax_tree_without_range()
[all …]
Djoin_lines.rs7 SyntaxKind::{self, USE_TREE, WHITESPACE},
22 // Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces.
25 // https://user-images.githubusercontent.com/1711539/124515923-4504e800-dde9-11eb-8d58-d97945a1a785…
31 // | VS Code | **rust-analyzer: Join lines**
34 // image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917a-11eb-87c4-b75a…
39 ) -> TextEdit { in join_lines()
75 let range = intersection - token.text_range().start(); in remove_newlines()
92 if token.kind() != WHITESPACE || token.text().bytes().filter(|&b| b == b'\n').count() != 1 { in remove_newline()
95 offset - token.text_range().start() + TextSize::of('\n'), in remove_newline()
131 // Removes: trailing comma, newline (incl. surrounding whitespace) in remove_newline()
[all …]
Dfolding_ranges.rs40 pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> { in folding_ranges()
136 fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> { in fold_kind()
157 fn contiguous_range_for_item_group<N>(first: N, visited: &mut FxHashSet<N>) -> Option<TextRange> in contiguous_range_for_item_group()
169 if let Some(ws) = ast::Whitespace::cast(token) { in contiguous_range_for_item_group()
171 // Ignore whitespace without blank lines in contiguous_range_for_item_group()
203 fn eq_visibility(vis0: Option<ast::Visibility>, vis1: Option<ast::Visibility>) -> bool { in eq_visibility()
214 ) -> Option<TextRange> { in contiguous_range_for_comment()
227 if let Some(ws) = ast::Whitespace::cast(token.clone()) { in contiguous_range_for_comment()
229 // Ignore whitespace without blank lines in contiguous_range_for_comment()
261 fn fold_range_for_where_clause(where_clause: ast::WhereClause) -> Option<TextRange> { in fold_range_for_where_clause()
[all …]
/third_party/python/Lib/
Dtabnanny.py5 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 …]
/third_party/python/Doc/library/
Dtabnanny.rst1 :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/
Dcheck-format.pl3 # 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/rust/rust/tests/rustdoc-gui/
Dwhere-whitespace.goml2 go-to: "file://" + |DOC_PATH| + "/lib2/trait.Whitespace.html"
3 show-text: true
4 // First, we check in the trait definition if the where clause is "on its own" (not on the same
5 // line than "pub trait Whitespace<Idx>").
6 compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y"))
8 compare-elements-position-false: (".item-decl .fn", ".where.fmt-newline", ("y"))
10 go-to: "file://" + |DOC_PATH| + "/lib2/struct.WhereWhitespace.html"
12 set-window-size: (915, 915)
14 compare-elements-position-false: ("#method\.new .fn", "#method\.new .where.fmt-newline", ("y"))
16 // "impl<K, T> Whitespace<&K> for WhereWhitespace<T>".
[all …]
/third_party/rust/rust/tests/ui/str/
Dstr-escape.rs1 // check-pass
2 // ignore-tidy-tab
14 //~^^^ WARNING whitespace symbol '\u{a0}' is not skipped in main()
27 //~^^ WARNING whitespace symbol '\u{c}' is not skipped in main()
28 // '\x0c' is ASCII whitespace, but it may not need skipped in main()
29 // discussion: https://github.com/rust-lang/rust/pull/108403 in main()
/third_party/curl/lib/
Dcurl_path.c21 * 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/
Dcopyright.py8 # 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/rust/rust/library/core/src/slice/
Dascii.rs16 pub const fn is_ascii(&self) -> bool { in is_ascii()
25 pub const fn as_ascii(&self) -> Option<&[ascii::Char]> { in as_ascii()
43 pub const unsafe fn as_ascii_unchecked(&self) -> &[ascii::Char] { in as_ascii_unchecked()
50 /// Checks that two slices are an ASCII case-insensitive match.
57 pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool { in eq_ignore_ascii_case()
61 /// Converts this slice to its ASCII upper case equivalent in-place.
64 /// but non-ASCII letters are unchanged.
78 /// Converts this slice to its ASCII lower case equivalent in-place.
81 /// but non-ASCII letters are unchanged.
109 pub fn escape_ascii(&self) -> EscapeAscii<'_> { in escape_ascii()
[all …]
/third_party/rust/rust/tests/ui/tuple/
Dindex-float.rs1 // check-pass
6 let () = tuple. 0.0; // OK, whitespace in main()
7 let () = tuple.0. 0; // OK, whitespace in main()
/third_party/skia/third_party/externals/icu/source/tools/toolutil/
Dpkg_icu.cpp4 * 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/m133/third_party/externals/icu/source/tools/toolutil/
Dpkg_icu.cpp4 * 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/icu/icu4c/source/tools/toolutil/
Dpkg_icu.cpp4 * 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/rust/rust/src/tools/rust-analyzer/crates/syntax/src/
Dalgo.rs23 ) -> impl Iterator<Item = SyntaxNode> { in ancestors_at_offset()
38 pub fn find_node_at_offset<N: AstNode>(syntax: &SyntaxNode, offset: TextSize) -> Option<N> { in find_node_at_offset()
42 pub fn find_node_at_range<N: AstNode>(syntax: &SyntaxNode, range: TextRange) -> Option<N> { in find_node_at_range()
47 pub fn skip_trivia_token(mut token: SyntaxToken, direction: Direction) -> Option<SyntaxToken> { in skip_trivia_token()
56 /// Skip to next non `whitespace` token
57 pub fn skip_whitespace_token(mut token: SyntaxToken, direction: Direction) -> Option<SyntaxToken> { in skip_whitespace_token()
58 while token.kind() == SyntaxKind::WHITESPACE { in skip_whitespace_token()
68 pub fn non_trivia_sibling(element: SyntaxElement, direction: Direction) -> Option<SyntaxElement> { in non_trivia_sibling()
74 fn not_trivia(element: &SyntaxElement) -> bool { in non_trivia_sibling()
82 pub fn least_common_ancestor(u: &SyntaxNode, v: &SyntaxNode) -> Option<SyntaxNode> { in least_common_ancestor()
[all …]
/third_party/rust/rust/compiler/rustc_lexer/src/
Dlib.rs1 //! Low-level Rust lexer.
4 //! by separating out pure lexing and rustc-specific concerns, like spans,
6 //! produces simple tokens which are a pair of type-tag and a bit of original text,
14 //! of well-known token types, so building an actual Rust token stream will
48 fn new(kind: TokenKind, len: u32) -> Token { in new()
56 // Multi-char tokens:
66 /// Any whitespace character sequence.
67 Whitespace, enumerator
90 /// Examples: `12u8`, `1.0e-40`, `b"123"`. Note that `_` is an invalid
92 /// this type will need to check for and reject that case.
[all …]
/third_party/rust/rust/src/tools/tidy/src/
Dstyle.rs1 //! Tidy check to enforce various stylistic guidelines on the Rust codebase.
5 //! * No lines over 100 characters (in non-Rust files).
6 //! * No files with over 3000 lines (in non-Rust files).
8 //! * No trailing whitespace.
14 //! preferable to be formatted rather than tidy-clean.
16 //! A number of these checks can be opted-out of with various directives of the form:
17 //! `// ignore-tidy-CHECK-NAME`.
18 // ignore-tidy-dbg
25 /// displayed on the console with --example.
38 * use "```no_run", if the code should type-check but not necessary linkable/runnable, or
[all …]
/third_party/python/Lib/distutils/
Dtext_file.py11 """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/icu/icu4c/source/i18n/
Dnumparse_types.h18 // 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 …]
/third_party/skia/m133/third_party/externals/icu/source/i18n/
Dnumparse_types.h18 // 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 …]
/third_party/skia/third_party/externals/icu/source/i18n/
Dnumparse_types.h18 // 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 …]
/third_party/libinput/
D.pre-commit-config.yaml2 - 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 …]

12345678910>>...43