@@ -31,9 +31,9 @@ function scandir!(files, root)
3131 elseif (@tryx (isfile (jf), false ) || @tryx (islink (jf), false ))
3232 # Check for .jl, .md, .jmd, .qmd files
3333 if endswith (jf, " .jl" ) ||
34- endswith (jf, " .md" ) ||
35- endswith (jf, " .jmd" ) ||
36- endswith (jf, " .qmd" )
34+ endswith (jf, " .md" ) ||
35+ endswith (jf, " .jmd" ) ||
36+ endswith (jf, " .qmd" )
3737 push! (files, jf)
3838 end
3939 end
@@ -45,10 +45,10 @@ function scandir!(files, root)
4545end
4646
4747function panic (
48- msg:: String ,
49- err:: Union{Exception,Nothing} = nothing ,
50- bt:: Union{Vector{Base.StackFrame},Nothing} = nothing ,
51- )
48+ msg:: String ,
49+ err:: Union{Exception, Nothing} = nothing ,
50+ bt:: Union{Vector{Base.StackFrame}, Nothing} = nothing ,
51+ )
5252 printstyled (stderr , " ERROR: " ; color = :red , bold = true )
5353 print (stderr , msg)
5454 if err != = nothing
@@ -315,7 +315,7 @@ function main(argv::Vector{String})
315315 format_markdown = false
316316 config_priority = false
317317 style_name = " default"
318- format_options = Dict {Symbol,Any} ()
318+ format_options = Dict {Symbol, Any} ()
319319 ignore_patterns = String[]
320320
321321 paths = String[]
@@ -355,7 +355,7 @@ function main(argv::Vector{String})
355355 if i >= length (argv)
356356 return panic (" expected output file argument after `-o`" )
357357 end
358- outputfile = argv[i+ 1 ]
358+ outputfile = argv[i + 1 ]
359359 i += 2
360360 elseif startswith (x, " --output=" )
361361 m = match (r" ^--output=(.+)$" , x)
@@ -562,21 +562,21 @@ function main(argv::Vector{String})
562562 nfiles_str = string (length (inputfiles))
563563 options_list = (
564564 ProcessFileArgs (
565- inputfile,
566- file_counter,
567- nfiles_str,
568- print_progress,
569- check,
570- inplace,
571- outputfile,
572- input_is_stdin,
573- stdin_filename,
574- config_dir,
575- format_options,
576- diff,
577- format_markdown,
578- config_priority,
579- ) for (file_counter, inputfile) in enumerate (inputfiles)
565+ inputfile,
566+ file_counter,
567+ nfiles_str,
568+ print_progress,
569+ check,
570+ inplace,
571+ outputfile,
572+ input_is_stdin,
573+ stdin_filename,
574+ config_dir,
575+ format_options,
576+ diff,
577+ format_markdown,
578+ config_priority,
579+ ) for (file_counter, inputfile) in enumerate (inputfiles)
580580 )
581581
582582 # Use multithreading for multiple files (only if multiple threads available)
@@ -629,7 +629,7 @@ struct ProcessFileArgs
629629 input_is_stdin:: Bool
630630 stdin_filename:: String
631631 config_dir:: String
632- format_options:: Dict{Symbol,Any}
632+ format_options:: Dict{Symbol, Any}
633633 diff:: Bool
634634 format_markdown:: Bool
635635 config_priority:: Bool
@@ -739,8 +739,8 @@ function process_file(args::ProcessFileArgs)
739739 if args. outputfile == " " || args. outputfile == " -"
740740 Output (:stdout , " " , stdout , false , false )
741741 elseif isfile (args. outputfile) &&
742- ! args. input_is_stdin &&
743- samefile (args. outputfile, args. inputfile)
742+ ! args. input_is_stdin &&
743+ samefile (args. outputfile, args. inputfile)
744744 if args. print_progress
745745 @lock print_lock begin
746746 buf = IOBuffer ()
@@ -764,7 +764,7 @@ function process_file(args::ProcessFileArgs)
764764 effective_options = if args. inputfile != " -"
765765 # Find and load .JuliaFormatter.toml config
766766 config_nt = find_config_file (args. inputfile)
767- config_dict = Dict {Symbol,Any} (Symbol (k) => v for (k, v) in pairs (config_nt))
767+ config_dict = Dict {Symbol, Any} (Symbol (k) => v for (k, v) in pairs (config_nt))
768768 # Merge: by default, command line options override config file
769769 # If --prioritize-config-file is set, config file options override command line
770770 if args. config_priority
@@ -781,7 +781,7 @@ function process_file(args::ProcessFileArgs)
781781 # Try to find config file recursively from the directory
782782 find_config_file (args. config_dir)
783783 end
784- config_dict = Dict {Symbol,Any} (Symbol (k) => v for (k, v) in pairs (config_nt))
784+ config_dict = Dict {Symbol, Any} (Symbol (k) => v for (k, v) in pairs (config_nt))
785785 if args. config_priority
786786 merge (args. format_options, config_dict)
787787 else
@@ -795,9 +795,9 @@ function process_file(args::ProcessFileArgs)
795795 if args. inputfile != " -"
796796 ignore_patterns = get (effective_options, :ignore , String[])
797797 if any (
798- pattern -> occursin (Glob. FilenameMatch (" *$pattern " ), args. inputfile),
799- ignore_patterns,
800- )
798+ pattern -> occursin (Glob. FilenameMatch (" *$pattern " ), args. inputfile),
799+ ignore_patterns,
800+ )
801801 # Skip ignored files
802802 if args. print_progress
803803 @lock print_lock begin
0 commit comments