Package io.github.cdklabs.projen
Class IgnoreFile
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.FileBase
-
- io.github.cdklabs.projen.IgnoreFile
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:42.764Z") @Stability(Experimental) public class IgnoreFile extends FileBase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIgnoreFile.Builder(experimental) A fluent builder forIgnoreFile.
-
Constructor Summary
Constructors Modifier Constructor Description IgnoreFile(Project project, String filePath)IgnoreFile(Project project, String filePath, IgnoreFileOptions options)protectedIgnoreFile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedIgnoreFile(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPatterns(@NotNull String... patterns)(experimental) Add ignore patterns.voidexclude(@NotNull String... patterns)(experimental) Ignore the files that match these patterns.BooleangetFilterCommentLines()BooleangetFilterEmptyLines()voidinclude(@NotNull String... patterns)(experimental) Always include the specified file patterns.voidremovePatterns(@NotNull String... patterns)(experimental) Removes patterns previously added from the ignore file.protected StringsynthesizeContent(IResolver resolver)(experimental) Implemented by derived classes and returns the contents of the file to emit.-
Methods inherited from class io.github.cdklabs.projen.FileBase
getAbsolutePath, getChanged, getExecutable, getMarker, getPath, getReadonly, setExecutable, setReadonly, synthesize
-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
IgnoreFile
protected IgnoreFile(software.amazon.jsii.JsiiObjectRef objRef)
-
IgnoreFile
protected IgnoreFile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
IgnoreFile
@Stability(Experimental) public IgnoreFile(@NotNull Project project, @NotNull String filePath, @Nullable IgnoreFileOptions options)- Parameters:
project- The project to tie this file to. This parameter is required.filePath-- the relative path in the project to put the file.
options-
-
-
Method Detail
-
addPatterns
@Stability(Experimental) public void addPatterns(@NotNull @NotNull String... patterns)(experimental) Add ignore patterns.Files that match this pattern will be ignored. If the pattern starts with a negation mark
!, files that match will not be ignored.Comment lines (start with
#) and blank lines ("") are filtered by default but can be included using options specified when instantiating the component.- Parameters:
patterns- Ignore patterns. This parameter is required.
-
exclude
@Stability(Experimental) public void exclude(@NotNull @NotNull String... patterns)(experimental) Ignore the files that match these patterns.- Parameters:
patterns- The patterns to match. This parameter is required.
-
include
@Stability(Experimental) public void include(@NotNull @NotNull String... patterns)(experimental) Always include the specified file patterns.- Parameters:
patterns- Patterns to include in git commits. This parameter is required.
-
removePatterns
@Stability(Experimental) public void removePatterns(@NotNull @NotNull String... patterns)(experimental) Removes patterns previously added from the ignore file.If
addPattern()is called after this, the pattern will be added again.- Parameters:
patterns- patters to remove. This parameter is required.
-
synthesizeContent
@Stability(Experimental) @Nullable protected String synthesizeContent(@NotNull IResolver resolver)
(experimental) Implemented by derived classes and returns the contents of the file to emit.- Specified by:
synthesizeContentin classFileBase- Parameters:
resolver- This parameter is required.- Returns:
- the content to synthesize or undefined to skip the file
-
getFilterCommentLines
@Stability(Experimental) @NotNull public Boolean getFilterCommentLines()
-
getFilterEmptyLines
@Stability(Experimental) @NotNull public Boolean getFilterEmptyLines()
-
-