Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia Formatting with Blue Style #181

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style = "blue"
13 changes: 13 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Format suggestions
on:
pull_request:
# this argument is not required if you don't use the `suggestion-label` input
types: [ opened, reopened, synchronize, labeled, unlabeled ]
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@v3
with:
version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1')
suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![codecov.io](https://codecov.io/github/rofinn/FilePathsBase.jl/coverage.svg?branch=master)](https://codecov.io/rofinn/FilePathsBase.jl?branch=master)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://rofinn.github.io/FilePathsBase.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://rofinn.github.io/FilePathsBase.jl/dev)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/JuliaDiff/BlueStyle)

FilePathsBase.jl provides a type based approach to working with filesystem paths in julia.

Expand Down
22 changes: 8 additions & 14 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
using Documenter, FilePathsBase, FilePathsBase.TestPaths


const SETUP_CODE = quote
using FilePathsBase
using FilePathsBase: /, join
end

DocMeta.setdocmeta!(FilePathsBase, :DocTestSetup, SETUP_CODE; recursive=true)

makedocs(
makedocs(;
modules=[FilePathsBase],
format=Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
),
format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true"),
pages=[
"Home" => "index.md",
"Design" => "design.md",
"FAQ" => "faq.md",
"API" => "api.md",
"Home" => "index.md", "Design" => "design.md", "FAQ" => "faq.md", "API" => "api.md"
],
repo="https://github.com/rofinn/FilePathsBase.jl/blob/{commit}{path}#L{line}",
sitename="FilePathsBase.jl",
Expand All @@ -26,9 +20,9 @@ makedocs(
# strict = true,
)

deploydocs(
repo = "github.com/rofinn/FilePathsBase.jl.git",
target = "build",
deps = nothing,
make = nothing,
deploydocs(;
repo="github.com/rofinn/FilePathsBase.jl.git",
target="build",
deps=nothing,
make=nothing,
)
6 changes: 4 additions & 2 deletions ext/FilePathsBaseMmapExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module FilePathsBaseMmapExt
using Mmap
using FilePathsBase

Mmap.mmap(fp::FilePathsBase.SystemPath, args...; kwargs...) = Mmap.mmap(string(fp), args...; kwargs...)
function Mmap.mmap(fp::FilePathsBase.SystemPath, args...; kwargs...)
return Mmap.mmap(string(fp), args...; kwargs...)
end

end #module
end #module
Loading
Loading