DStyle

Documentation for DStyle.

DStyle.check_index_from_lengthMethod
check_index_from_length(source; file="<memory>")

Reports lines that index or iterate using bounds derived from length/size, for example for i in 1:length(x) or x[1:size(x, 1)].

source
DStyle.check_kernel_function_barriersMethod
check_kernel_function_barriers(source; file="<memory>", max_lines_from_signature=1)

Checks each function ... end block and reports a violation when the first loop (for/while) appears more than max_lines_from_signature lines after the function signature.

source
DStyle.github_actions_badgeMethod
github_actions_badge(repo; workflow_filename="dstyle.yml", label="DStyle", branch=nothing)

Returns Markdown for a dynamic GitHub Actions badge for the provided repository owner/repo.

source
DStyle.github_actions_badgeMethod
github_actions_badge(; repo=nothing, workflow_filename="dstyle.yml", label="DStyle", branch=nothing)

Like github_actions_badge(repo; ...), but infers repo from ENV["GITHUB_REPOSITORY"] or your local git remote origin when omitted.

source
DStyle.github_actions_workflowMethod
github_actions_workflow(; name="DStyle", julia_version="1.11", paths=nothing, workflow_filename="dstyle.yml", package_url="https://github.com/D3MZ/DStyle.jl")

Returns a GitHub Actions workflow YAML string that runs DStyle.test_all(...) on push and pull_request.

source
DStyle.install_github_actions!Method
install_github_actions!(; workflow_path=".github/workflows/dstyle.yml", kwargs...)

Installs a generated DStyle workflow file into your repository and returns the written path.

source
DStyle.readme_badgeMethod
readme_badge(; paths=nothing, max_lines_from_signature=1, label="DStyle", style="flat-square", link=nothing)

Builds a Shields.io badge snippet for README files using current DStyle check results. The badge message is pass when no violations exist; otherwise it is fail(<count>).

source
DStyle.setup_github_actions_badge!Method
setup_github_actions_badge!(; workflow_path=".github/workflows/dstyle.yml", repo=nothing, branch=nothing, kwargs...)

One-shot setup helper: writes the DStyle GitHub Actions workflow and returns the dynamic badge markdown (with inferred repo unless explicitly provided). Returns a named tuple (workflow_path, repo, badge).

source
DStyle.setupgithub!Method
setupgithub!(; kwargs...)

One-call GitHub setup. Installs the DStyle GitHub Actions workflow and returns (workflow_path, repo, badge) for immediate README usage.

source
DStyle.test_allMethod
test_all(testtarget::Module; kernel_function_barriers=true, julia_index_from_length=true, paths=nothing)

Aqua-style entrypoint. Runs style tests for testtarget using @testset. Use rule=false to disable a check, or pass a NamedTuple to configure check kwargs.

source
DStyle.test_allMethod
test_all(; paths=nothing, max_lines_from_signature=1, throw=true)

Runs all currently implemented style checks over one or more Julia files.

source
DStyle.test_index_from_lengthMethod
test_index_from_length(paths; broken=false, show_details=!broken)

Test that code does not index or iterate with length/size derived indices. Returns collected violations.

source
DStyle.test_kernel_function_barriersMethod
test_kernel_function_barriers(paths; max_lines_from_signature=1, broken=false, show_details=!broken)

Test that no kernel-function-barrier violations exist in paths. Returns collected violations.

source