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

WIP: List directory and format files #4

Merged
merged 2 commits into from
Jan 11, 2021
Merged

WIP: List directory and format files #4

merged 2 commits into from
Jan 11, 2021

Conversation

Rizary
Copy link
Contributor

@Rizary Rizary commented Jan 7, 2021

Tracking progress for:

  1. List directory to be formatted
  2. Parsing config with new fmt.toml format
  3. Formatting files

src/lib.rs Outdated

/// Config for each formatters
#[derive(Debug, Deserialize)]
struct FmtConfig {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled: bool

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated

if let true = fmtToml.as_path().exists() {
if let true = fmt_toml.as_path().exists() {
println!("found fmt.toml");
println!("set path to {}/", cwd.to_str().unwrap_or(""));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

builtin_formatters = mapFmtConfig

let toml_content: Root = toml::from_str(&open_file)?;
let rustdir = toml_content.rustfmt
.and_then(|config| config.includes).unwrap_or(Vec::new());

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final_config = merge(builtin_formatters, toml_content)

@Rizary Rizary merged commit 044fdbb into master Jan 11, 2021
@zimbatm zimbatm deleted the list-and-format branch January 11, 2021 15:21
brianmcgee added a commit that referenced this pull request May 13, 2024
…nstall-nix-action-26

chore(deps): bump cachix/install-nix-action from 25 to 26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants