Class LanguageCheckTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.github.sergeloie.languagecheck.LanguageCheckTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.Named,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@DisableCachingByDefault(because="The scanned file set is the whole project working tree, not modelled as task inputs.")
public abstract class LanguageCheckTask
extends org.gradle.api.DefaultTask
The
languageCheck verification task.
Scans every included file against a CharPolicy derived from
the configuration: ASCII-only extensions use a strict ASCII policy, mapped
extensions use the union of their languages' alphabets, and those listed
in formattingExtensions additionally allow the global formatting
characters; everything else is skipped. Violations are written to the
report file; the build fails when failOnViolation is enabled.
The task always re-runs (upToDateWhen(false)) and is not
cacheable: the scanned file set is the whole project working tree, which
is not modeled as task inputs. All properties are @Internal by
design for the same reason.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.SetProperty<String> User-supplied language files, keyed by language code.abstract org.gradle.api.provider.SetProperty<String> abstract org.gradle.api.provider.SetProperty<String> abstract org.gradle.api.provider.SetProperty<String> abstract org.gradle.api.provider.Property<Boolean> abstract org.gradle.api.provider.SetProperty<String> abstract org.gradle.api.provider.Property<Long> Timeout for thegit ls-filessubprocess (GIT scan mode), in seconds.abstract org.gradle.api.provider.Property<Long> abstract org.gradle.api.provider.Property<Integer> abstract org.gradle.api.file.DirectoryPropertyThe project root directory, wired by the plugin at configuration time.abstract org.gradle.api.file.RegularFilePropertyabstract org.gradle.api.provider.Property<ScanMode> abstract org.gradle.api.provider.SetProperty<String> voidrun()Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
LanguageCheckTask
public LanguageCheckTask()
-
-
Method Details
-
getScanMode
-
getExcludedFiles
-
getExcludedDirs
-
getExcludedExtensions
-
getExtensionLanguages
-
getAsciiOnlyExtensions
-
getFormattingExtensions
-
getUtf8ExemptExtensions
-
getMaxFileSize
-
getMaxViolationsPerFile
-
getFailOnViolation
-
getGitTimeoutSeconds
Timeout for thegit ls-filessubprocess (GIT scan mode), in seconds. -
getCustomLanguages
User-supplied language files, keyed by language code. The files themselves are@Internalbecause the task is never cached and always re-runs; the scanned file set is the whole working tree. -
getReportFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getReportFile() -
getProjectDirectory
@Internal public abstract org.gradle.api.file.DirectoryProperty getProjectDirectory()The project root directory, wired by the plugin at configuration time. A dedicated property (rather thanTask.project) keeps the task compatible with the configuration cache, which forbids touchingProjectduring execution. -
run
public void run()
-