You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, ScanCode ignores files ending with `.java` and the `licenses` directory,
193
+
and continues with other files as usual.
194
+
195
+
This is also compatible with the `scancode.io configuration file <https://scancodeio.readthedocs.io/en/latest/project-configuration.html#ignored-patterns>`_.
196
+
197
+
----
198
+
199
+
.. _glob-pattern-matching:
200
+
201
+
Glob Pattern Matching
202
+
---------------------
203
+
204
+
All the pre-scan options use pattern matching, so the basics of Glob Pattern Matching is
205
+
discussed briefly below.
206
+
207
+
Glob pattern matching is useful for matching a group of files, by using patterns in their
208
+
names. Then using these patterns, files are grouped and treated differently as required.
209
+
210
+
Here are some rules from the `Linux Manual <http://man7.org/linux/man-pages/man7/glob.7.html>`_
211
+
on glob patterns. Refer the same for more detailed information.
212
+
213
+
A string is a wildcard pattern if it contains one of the characters '?', '*' or '['. Globbing
214
+
is the operation that expands a wildcard pattern into the list of pathnames matching the
215
+
pattern. Matching is defined by:
216
+
217
+
- A '?' (not between brackets) matches any single character.
218
+
219
+
- A '*' (not between brackets) matches any string, including the empty string.
220
+
221
+
- An expression "[...]" where the first character after the leading '[' is not an '!' matches a
222
+
single character, namely any of the characters enclosed by the brackets.
223
+
224
+
- There is one special convention: two characters separated by '-' denote a range.
225
+
226
+
- An expression "[!...]" matches a single character, namely any character that is not matched
227
+
by the expression obtained by removing the first '!' from it.
228
+
229
+
- A '/' in a pathname cannot be matched by a '?' or '*' wildcard, or by a range like "[.-0]".
230
+
231
+
Note that wildcard patterns are not regular expressions, although they are a bit similar.
232
+
233
+
For more information on glob pattern matching refer these resources:
0 commit comments