From b6e2521ef00473873020d1edbb97227730e79def Mon Sep 17 00:00:00 2001 From: folkengine Date: Wed, 6 May 2026 17:56:52 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Fixes=20=20=20-=20CI.yaml=20=E2=80=94=20rem?= =?UTF-8?q?oved=20--cfg=20thiserror=5Fnightly=5Ftesting=20(thiserror-inter?= =?UTF-8?q?nal=20flag=20with=20no=20meaning=20in=20a=20blank=20template)?= =?UTF-8?q?=20=20=20-=20audit.yml=20=E2=80=94=20removed=20redundant=20push?= =?UTF-8?q?:=20paths:=20trigger=20(CI.yaml=20deny=20job=20already=20covers?= =?UTF-8?q?=20pushes;=20weekly=20cron=20retained)=20=20=20-=20copilot-inst?= =?UTF-8?q?ructions.md=20=E2=80=94=20fixed=20YourFunction=20=E2=86=92=20Yo?= =?UTF-8?q?urStruct=20in=20doc=20test=20import=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Config / Docs - .rustfmt.toml — removed all stale rustfmt 0.x options; updated renamed ones (brace_style, fn_params_layout, trailing_comma, condense_wildcard_suffixes, etc.) with migration notes - README.md — added cargo deny to the list of steps run by make - Makefile — install-tools now installs cargo-watch; help text updated to match --- - | 82 +++++++++++ .github/copilot-instructions.md | 2 +- .github/workflows/CI.yaml | 1 - .github/workflows/audit.yml | 6 +- .rustfmt.toml | 246 ++++++-------------------------- Makefile | 3 +- README.md | 1 + 7 files changed, 132 insertions(+), 209 deletions(-) create mode 100644 - diff --git a/- b/- new file mode 100644 index 0000000..4db38da --- /dev/null +++ b/- @@ -0,0 +1,82 @@ +max_width = 100 +hard_tabs = false +tab_spaces = 4 +newline_style = "Auto" +indent_style = "Block" +use_small_heuristics = "Default" +fn_call_width = 60 +attr_fn_like_width = 70 +struct_lit_width = 18 +struct_variant_width = 35 +array_width = 60 +chain_width = 60 +single_line_if_else_max_width = 50 +single_line_let_else_max_width = 50 +wrap_comments = false +format_code_in_doc_comments = false +doc_comment_code_block_width = 100 +comment_width = 80 +normalize_comments = false +normalize_doc_attributes = false +format_strings = false +format_macro_matchers = false +format_macro_bodies = true +skip_macro_invocations = [] +hex_literal_case = "Preserve" +float_literal_trailing_zero = "Preserve" +empty_item_single_line = true +struct_lit_single_line = true +fn_single_line = false +where_single_line = false +imports_indent = "Block" +imports_layout = "Mixed" +imports_granularity = "Preserve" +group_imports = "Preserve" +reorder_imports = true +reorder_modules = true +reorder_impl_items = false +type_punctuation_density = "Wide" +space_before_colon = false +space_after_colon = true +spaces_around_ranges = false +binop_separator = "Front" +remove_nested_parens = true +combine_control_expr = true +short_array_element_width_threshold = 10 +overflow_delimited_expr = false +struct_field_align_threshold = 0 +enum_discrim_align_threshold = 0 +match_arm_blocks = true +match_arm_leading_pipes = "Never" +match_arm_indent = true +force_multiline_blocks = false +fn_params_layout = "Tall" +brace_style = "SameLineWhere" +control_brace_style = "AlwaysSameLine" +trailing_semicolon = true +trailing_comma = "Vertical" +match_block_trailing_comma = false +blank_lines_upper_bound = 1 +blank_lines_lower_bound = 0 +edition = "2015" +style_edition = "2015" +version = "One" +inline_attribute_width = 0 +format_generated_files = true +generated_marker_line_search_limit = 5 +merge_derives = true +use_try_shorthand = false +use_field_init_shorthand = false +force_explicit_abi = true +condense_wildcard_suffixes = false +color = "Auto" +required_version = "1.9.0" +unstable_features = false +disable_all_formatting = false +skip_children = false +show_parse_errors = true +error_on_line_overflow = false +error_on_unformatted = false +ignore = [] +emit_mode = "Files" +make_backup = false diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d676c15..387fa6e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -32,7 +32,7 @@ These instructions guide GitHub Copilot to generate code that aligns with our pr /// /// # Examples /// ``` -/// use pkcore::your_module::YourFunction; +/// use pkcore::your_module::YourStruct; /// let result = your_function(42); /// assert_eq!(result, expected_value); /// ``` diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 56965d3..291154d 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -20,7 +20,6 @@ jobs: rust: [beta, stable, 1.85.0] include: - rust: nightly - rustflags: --cfg thiserror_nightly_testing timeout-minutes: 45 steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fa733af..7e7219a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -1,11 +1,7 @@ name: Security audit on: - schedule: # Every Sunday at 1 AM + schedule: # Every Sunday at 1 AM - cron: '0 1 * * 0' - push: - paths: - - '**/Cargo.toml' - - '**/Cargo.lock' jobs: security_audit: diff --git a/.rustfmt.toml b/.rustfmt.toml index cb1473d..5839018 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -2,47 +2,35 @@ # r u s t f m t - C O N F I G # ================================================================================== # -# Version: 0.7.1 -# Author : Robbepop +# Original: Robbepop +# Updated to remove options no longer supported by rustfmt stable (1.9.0+). # -# A predefined .rustfmt.toml file with all configuration options and their -# associated description, possible values and default values for use in other -# projects. -# -# This should actually automatically be shipped with cargo fmt or rustfmt itself! +# Only `max_width = 100` is active. Uncomment others to customize. +# Run `rustfmt --print-config=default ` to see all current defaults. # ---------------------------------------------------------------------------------- -# Use verbose output. -# Default: false -# verbose = - # Do not reformat out of line modules. # Default: false # skip_children = -# Lines to format; this is not supported in rustfmt.toml, -# and can only be specified via the --file-lines option. -# file_lines = - # Maximum width of each line. # Default: 100 -# max_width = - -# Ideal width of each line. -# Default: 80 max_width = 100 # Number of spaces per tab. # Default: 4 -# tab_spaces = +# tab_spaces = -# Maximum width of the args of a function call before -# falling back to vertical formatting. +# Use tab characters for indentation, spaces for alignment. +# Default: false +# hard_tabs = + +# Maximum width of the args of a function call before falling back to vertical formatting. # Default: 60 # fn_call_width = -# Maximum width in the body of a struct lit before falling back to vertical formatting. -# Default: 16 +# Maximum width in the body of a struct literal before falling back to vertical formatting. +# Default: 18 # struct_lit_width = # Maximum width in the body of a struct variant before falling back to vertical formatting. @@ -54,171 +42,68 @@ max_width = 100 # force_explicit_abi = # Unix or Windows line endings. -# Values: Windows | Unix | Native -# Default: Unix +# Values: Auto | Windows | Unix | Native +# Default: Auto # newline_style = -# Brace style for functions. +# Brace style for functions, structs, and enums. +# (Previously split into fn_brace_style and item_brace_style.) # Values: AlwaysNextLine | PreferSameLine | SameLineWhere # Default: SameLineWhere -# fn_brace_style = +# brace_style = -# Brace style for structs and enums. -# Values: AlwaysNextLine | PreferSameLine | SameLineWhere -# Default: SameLineWhere -# item_brace_style = - -# Brace style for control flow construct. +# Brace style for control flow constructs. # Values: AlwaysSameLine | ClosingNextLine | AlwaysNextLine # Default: AlwaysSameLine # control_brace_style = -# Put empty-body implementations on a single line. +# Put empty-body implementations and functions on a single line. +# (Previously impl_empty_single_line / fn_empty_single_line.) # Default: true -# impl_empty_single_line = - -# Put empty-body functions on a single line. -# Default: true -# fn fn_empty_single_line = +# empty_item_single_line = # Put single-expression functions on a single line. # Default: false # fn_single_line = -# Location of return type in function declaration. -# Values: WithArgs | WithWhereClause -# Default: WithArgs -# fn_return_indent = - -# If function argument parenthesis goes on a newline. -# Default: true -# fn_args_paren_newline = - -# Argument density in functions. -# Values: Compressed | Tall | CompressedIfEmpty | Vertical +# Layout of function parameters. +# (Previously fn_args_layout / fn_args_density.) +# Values: Compressed | Tall | Vertical # Default: Tall -# fn_args_density = - -# Layout of function arguments. -# Values: Visual | Block | BlockAlways -# Default: Visual -# fn_args_layout = - -# Indent on function arguments. -# Values: Inherit | Tabbed | Visual -# Default: Visual -# fn_arg_indent = +# fn_params_layout = # Determines if '+' or '=' are wrapped in spaces in the punctuation of types. # Values: Compressed | Wide # Default: Wide # type_punctuation_density = -# Density of a where clause. -# Values: Compressed | Tall | CompressedIfEmpty | Vertical -# Default: CompressedIfEmpty -# where_density = - -# Indentation of a where clause. -# Values: Inherit | Tabbed | Visual -# Default: Tabbed -# where_indent = - -# Element layout inside a where clause. -# Values: Vertical | Horizontal | HorizontalVertical | Mixed -# Default: Vertical -# where_layout = - -# Indentation style of a where predicate. -# Values: Inherit | Tabbed | Visual -# Default: Visual -# where_pred_indent = - -# Put a trailing comma on where clauses. -# Default: false -# where_trailing_comma = - -# Indentation of generics. -# Values: Inherit | Tabbed | Visual -# Default: Visual -# generics_indent = - -# If there is a trailing comma on structs. +# Trailing comma behavior for structs, enums, and struct literals. +# (Previously struct_trailing_comma / struct_lit_trailing_comma / enum_trailing_comma.) # Values: Always | Never | Vertical # Default: Vertical -# struct_trailing_comma = +# trailing_comma = -# If there is a trailing comma on literal structs. -# Values: Always | Never | Vertical -# Default: Vertical -# struct_lit_trailing_comma = - -# Style of struct definition. -# Values: Visual | Block -# Default: Block -# struct_lit_style = - -# Multiline style on literal structs. -# Values: PreferSingle | ForceMulti -# Default: PreferSingle -# struct_lit_multiline_style = - -# Put a trailing comma on enum declarations. -# Default: true -# enum_trailing_comma = - -# Report all, none or unnumbered occurrences of TODO in source file comments. -# Values: Always | Unnumbered | Never -# Default: Never -# report_todo = - -# Report all, none or unnumbered occurrences of FIXME in source file comments. -# Values: Always | Unnumbered | Never -# Default: Never -# report_fixme = - -# Indent on chain base. -# Values: Inherit | Tabbed | Visual -# Default: Tabbed -# chain_base_indent = - -# Indentation of chain. -# Values: Inherit | Tabbed | Visual -# Default: Tabbed -# chain_indent = +# Put a trailing comma after a block based match arm. +# Default: false +# match_block_trailing_comma = -# Allow last call in method chain to break the line. +# Wrap multiline match arms in blocks. +# (Previously wrap_match_arms.) # Default: true -# chains_overflow_last = +# match_arm_blocks = # Reorder import statements alphabetically. -# Default: false +# Default: true # reorder_imports = -# Reorder lists of names in import statements alphabetically. -# Default: false -# reorder_imported_names = - # Maximum line length for single line if-else expressions. # A value of zero means always break if-else expressions. # Default: 50 # single_line_if_else_max_width = # Format string literals where necessary. -# Default: true -# format_strings = - -# Always format string literals. # Default: false -# force_format_strings = - -# Retain some formatting characteristics from the source code. -# Default: true -# take_source_hints = - -# Use tab characters for indentation, spaces for alignment. -# Default: false -# hard_tabs = +# format_strings = # Break comments to fit on the line. # Default: false @@ -228,65 +113,24 @@ max_width = 100 # Default: false # normalize_comments = -# Wrap multiline match arms in blocks. -# Default: true -# wrap_match_arms = - -# Put a trailing comma after a block based match arm (non-block arms are not affected). -# Default: false -# match_block_trailing_comma = - -# Put a trailing comma after a wildcard arm. -# Default: true -# match_wildcard_trailing_comma = - -# How many lines a closure must have before it is block indented. -# -1 means never use block indent. -# Type: -# Default: 5 -# closure_block_indent_threshold = - -# Leave a space before the colon in a type annotation. -# Default: false -# space_before_type_annotation = - -# Leave a space after the colon in a type annotation. -# Default: true -# space_after_type_annotation_colon = - -# Leave a space before the colon in a trait or lifetime bound. -# Default: false -# space_before_bound = - -# Leave a space after the colon in a trait or lifetime bound. -# Default: true -# space_after_bound_colon = - -# Put spaces around the .. and ... range operators. +# Put spaces around the .. and ... range operators. # Default: false # spaces_around_ranges = -# Put spaces within non-empty generic arguments. +# Leave a space before the colon in type annotations and trait/lifetime bounds. +# (Previously space_before_type_annotation / space_before_bound.) # Default: false -# spaces_within_angle_brackets = +# space_before_colon = -# Put spaces within non-empty square brackets. -# Default: false -# spaces_within_square_brackets = - -# Put spaces within non-empty parentheses. -# Default: false -# spaces_within_parens = +# Leave a space after the colon in type annotations and trait/lifetime bounds. +# (Previously space_after_type_annotation_colon / space_after_bound_colon.) +# Default: true +# space_after_colon = # Replace uses of the try! macro by the ? shorthand. # Default: false # use_try_shorthand = -# What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage. -# Values: Replace | Overwrite | Display | Diff | Coverage | Plain | Checkstyle -# Default: Replace -# write_mode = - # Replace strings of _ wildcards by a single .. in tuple patterns. # Default: false -# condense_wildcard_suffices = +# condense_wildcard_suffixes = diff --git a/Makefile b/Makefile index 35ae2b4..0150647 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ help: @echo " make docs - Create docs and open in browser (macOS/Linux)" @echo "" @echo "Tooling:" - @echo " make install-tools - Install cargo-deny and cargo-udeps" + @echo " make install-tools - Install cargo-deny, cargo-udeps, and cargo-watch" @echo " make watch - Run check/test in watch mode" @echo " make install-watch - Install cargo-watch" @echo "" @@ -117,6 +117,7 @@ install-tools: @echo "Installing development tools..." cargo install cargo-deny cargo install cargo-udeps + cargo install cargo-watch @echo "" @echo "✓ Tools installed!" @echo "" diff --git a/README.md b/README.md index 665ee1e..006e2c4 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ The default `make` runs the following tasks: * `cargo build` * `cargo test` * `cargo clippy` with `clippy::pedantic` lint settings +* `cargo deny` checks * `cargo doc --no-deps` To open the generated docs in your browser: From f9e5fdd5b3c71cbe0b424ee98f26a33b02e085f8 Mon Sep 17 00:00:00 2001 From: folkengine Date: Wed, 6 May 2026 18:03:22 -0700 Subject: [PATCH 2/2] removed - --- - | 82 --------------------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 - diff --git a/- b/- deleted file mode 100644 index 4db38da..0000000 --- a/- +++ /dev/null @@ -1,82 +0,0 @@ -max_width = 100 -hard_tabs = false -tab_spaces = 4 -newline_style = "Auto" -indent_style = "Block" -use_small_heuristics = "Default" -fn_call_width = 60 -attr_fn_like_width = 70 -struct_lit_width = 18 -struct_variant_width = 35 -array_width = 60 -chain_width = 60 -single_line_if_else_max_width = 50 -single_line_let_else_max_width = 50 -wrap_comments = false -format_code_in_doc_comments = false -doc_comment_code_block_width = 100 -comment_width = 80 -normalize_comments = false -normalize_doc_attributes = false -format_strings = false -format_macro_matchers = false -format_macro_bodies = true -skip_macro_invocations = [] -hex_literal_case = "Preserve" -float_literal_trailing_zero = "Preserve" -empty_item_single_line = true -struct_lit_single_line = true -fn_single_line = false -where_single_line = false -imports_indent = "Block" -imports_layout = "Mixed" -imports_granularity = "Preserve" -group_imports = "Preserve" -reorder_imports = true -reorder_modules = true -reorder_impl_items = false -type_punctuation_density = "Wide" -space_before_colon = false -space_after_colon = true -spaces_around_ranges = false -binop_separator = "Front" -remove_nested_parens = true -combine_control_expr = true -short_array_element_width_threshold = 10 -overflow_delimited_expr = false -struct_field_align_threshold = 0 -enum_discrim_align_threshold = 0 -match_arm_blocks = true -match_arm_leading_pipes = "Never" -match_arm_indent = true -force_multiline_blocks = false -fn_params_layout = "Tall" -brace_style = "SameLineWhere" -control_brace_style = "AlwaysSameLine" -trailing_semicolon = true -trailing_comma = "Vertical" -match_block_trailing_comma = false -blank_lines_upper_bound = 1 -blank_lines_lower_bound = 0 -edition = "2015" -style_edition = "2015" -version = "One" -inline_attribute_width = 0 -format_generated_files = true -generated_marker_line_search_limit = 5 -merge_derives = true -use_try_shorthand = false -use_field_init_shorthand = false -force_explicit_abi = true -condense_wildcard_suffixes = false -color = "Auto" -required_version = "1.9.0" -unstable_features = false -disable_all_formatting = false -skip_children = false -show_parse_errors = true -error_on_line_overflow = false -error_on_unformatted = false -ignore = [] -emit_mode = "Files" -make_backup = false