JetBrains DataSpell 2021.1 Help

Scope language syntax reference

You can use the scopes language to specify project scopes: sets of files, directories, and subdirectories.

Sets of files

  • To add a single file, use a filename (for example, MyDir/MyFile.txt)

  • To add all the files in a directory without subdirectories, use an asterisk after a slash (for example: file:src/main/myDir/*)

  • To add all the files in a directory with subdirectories, use an asterisk after a double slash (for example, file:src/main/myDir//*)

Logical operators

When you define scopes, you can use logical operators:

&& for AND || for OR ! for NOT

Also, you can use parentheses to join logical operators into groups. For example, the following scope includes either <a> and <c>, or <b> and <c>:

(<a>||<b>)&&<c>

Create a new scope from existing scopes

You can make a new scope from several existing scopes. In this case, you can reference the existing scopes by using $ $MyScope.

For example, the $Scope1||$Scope2 pattern places in a scope all files from Scope1 and Scope2.

Examples

  • file:*.js||file:*.coffee- include all JavaScript and CoffeeScript files.

  • file:*js&&!file:*.min.*- include all JavaScript files except those that were generated through minification, which is indicated by the min extension.

  • !file:*/.npm//*- exclude all .npm folders.

Last modified: 08 March 2021