{"$schema":"http://json-schema.org/draft-04/schema#","additionalProperties":false,"definitions":{"DirectFiles":{"description":"Count of direct files.","maximum":4294967295,"minimum":1,"type":"integer"},"DirectoryRatchet":{"additionalProperties":false,"description":"One directory direct-file ratchet ceiling.","properties":{"group":{"anyOf":[{"enum":["source","documentation"],"type":"string"},{"pattern":"^[a-z][a-z0-9_]*$","type":"string"}],"description":"Language group measured at this directory.","title":"Language group ID"},"max_direct_files":{"allOf":[{"$ref":"#/definitions/DirectFiles"}],"description":"Allowed direct-file ceiling for an existing violation."},"path":{"allOf":[{"$ref":"#/definitions/RelativePath"}],"description":"Repository-relative directory path. The repository root is `\"\"`."},"role":{"allOf":[{"$ref":"#/definitions/SourceKind"}],"description":"Production or test role measured at the directory."}},"required":["path","role","group","max_direct_files"],"type":"object"},"FileByteLimit":{"description":"Largest size, in bytes, that a file may have.\n\nConfiguration uses it for `max_bytes_per_file`, and the ratchet file for the ceiling of a file\nthat was already too large.","minimum":1,"type":"integer"},"FileRatchet":{"additionalProperties":false,"description":"One file line ratchet ceiling.","properties":{"max_lines":{"allOf":[{"$ref":"#/definitions/LineLimit"}],"description":"Allowed line ceiling for an existing violation."},"path":{"allOf":[{"description":"Normalized repository-relative path using forward slash separators.","pattern":"^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).*$","type":"string"},{"minLength":1}],"description":"Repository-relative source file path."},"role":{"allOf":[{"$ref":"#/definitions/SourceKind"}],"description":"Production or test role measured at the file."}},"required":["path","role","max_lines"],"type":"object"},"FileSizeEntry":{"anyOf":[{"allOf":[{"$ref":"#/definitions/FileByteLimit"}],"description":"Ceiling for a regular file, in bytes."},{"allOf":[{"$ref":"#/definitions/StoredFileSize"}],"description":"Ceiling for a file with the storage it names."}],"description":"How the ratchet file writes one byte ceiling."},"FileStorage":{"description":"How a file's content is stored, which decides the byte limit that applies to it.","oneOf":[{"description":"The file's content is stored as is, so `max_bytes_per_file` limits its size on disk.","enum":["regular"],"type":"string"},{"description":"Git LFS stores the file's content and the repository holds only a small pointer to it, so\n`max_bytes_per_lfs_object` limits the size of the content.","enum":["lfs"],"type":"string"}]},"LineLimit":{"description":"Positive line limit.","maximum":4294967295,"minimum":1,"type":"integer"},"RelativePath":{"description":"Normalized repository-relative path using forward slash separators.","pattern":"^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).*$","type":"string"},"SourceKind":{"description":"Production or test role assigned to an included source file.","oneOf":[{"description":"Production source file.","enum":["production"],"type":"string"},{"description":"Source file classified as test code.","enum":["test"],"type":"string"}]},"StoredFileSize":{"additionalProperties":false,"description":"Byte ceiling that names how the file's content was stored.","properties":{"max_bytes":{"allOf":[{"$ref":"#/definitions/FileByteLimit"}],"description":"Largest size, in bytes, the file may grow back to."},"storage":{"allOf":[{"$ref":"#/definitions/FileStorage"}],"description":"How the file's content was stored, which decides the byte limit it was over."}},"required":["max_bytes","storage"],"type":"object"}},"description":"Measured ceilings for current violations.\n\nThe file omits language, ownership, reasons, and configured limits. Checks derive those values\nfrom source classification and the configured limits.","id":"https://kpozin.github.io/sprawl-guard/schemas/v1/sprawl-guard.ratchet.schema.json","properties":{"directories":{"description":"Directory direct-file count ceilings for both source roles.","items":{"$ref":"#/definitions/DirectoryRatchet"},"type":"array"},"file_sizes":{"additionalProperties":false,"description":"Byte ceilings for files that were already larger than their byte limit, keyed by\nrepository-relative file path.","patternProperties":{"^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?=(?:.*/)?(?!\\.(?:/|$))[^/]).*$":{"$ref":"#/definitions/FileSizeEntry"}},"type":"object"},"files":{"default":[],"description":"File line ceilings for both source roles.","items":{"$ref":"#/definitions/FileRatchet"},"type":"array"},"schema_version":{"description":"Ratchet file schema version.","enum":[1],"title":"Ratchet schema version","type":"integer"}},"required":["schema_version"],"title":"Sprawl Guard ratchet","type":"object"}
