Class 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
    • 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.
        This parameter is required.
        options -
      • IgnoreFile

        @Stability(Experimental)
        public IgnoreFile​(@NotNull
                          Project project,
                          @NotNull
                          String filePath)
        Parameters:
        project - The project to tie this file to. This parameter is required.
        filePath -
        • the relative path in the project to put the file.
        This parameter is required.
    • 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:
        synthesizeContent in class FileBase
        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()