{"id":23331596,"url":"https://github.com/xbcsmith/ymlfxr","last_synced_at":"2025-04-09T16:16:45.752Z","repository":{"id":62997816,"uuid":"259649518","full_name":"xbcsmith/ymlfxr","owner":"xbcsmith","description":"Rust CLI for formating yaml so it passes stock yamllint","archived":false,"fork":false,"pushed_at":"2025-04-07T16:05:23.000Z","size":27,"stargazers_count":8,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T16:16:32.351Z","etag":null,"topics":["rust","yaml"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xbcsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-04-28T13:47:04.000Z","updated_at":"2025-04-07T15:52:14.000Z","dependencies_parsed_at":"2024-03-27T22:25:18.879Z","dependency_job_id":"c8ed8324-a321-44b4-bdfe-f2fe8c0b0d73","html_url":"https://github.com/xbcsmith/ymlfxr","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"2c66151c0aab69ad6db7c449e536023a34cd877b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbcsmith%2Fymlfxr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbcsmith%2Fymlfxr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbcsmith%2Fymlfxr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xbcsmith%2Fymlfxr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xbcsmith","download_url":"https://codeload.github.com/xbcsmith/ymlfxr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065285,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","yaml"],"created_at":"2024-12-20T22:39:44.535Z","updated_at":"2025-04-09T16:16:45.701Z","avatar_url":"https://github.com/xbcsmith.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ymlfxr\n\n## description\n\nrust cli for formatting yaml v1.2 that passes yamllint\nwith default settings\n\n## build\n\n```bash\ncargo build --release\n```\n\n## usage\n\n```bash\nParses an input yaml and output v1.2 yaml file\nusage:\n    ymlfxr bad.yaml \u003e good.yaml\n\nUSAGE:\n    ymlfxr [FLAGS] \u003cinput\u003e\n\nFLAGS:\n    -b, --bak        Create backup of file\n    -d, --debug      turn on debugging information\n    -h, --help       Prints help information\n    -i, --fix        Fix the file in place\n    -V, --version    Prints version information\n\nARGS:\n    \u003cinput\u003e    Sets the input file to use\n```\n\n## examples\n\n```bash\nymlfxr ./tests/bad.yaml \u003e ./tests/good.yaml\n\nymlfxr --fix ./tests/inplace.yaml\n\nymlfxr --bak --fix ./tests/inplace_w_bak.yaml\n```\n\n## test\n\nfunctional tests require `yamllint`\n\n```bash\n./testdata/functests.sh\n```\n\ntesting using cargo\n\n```bash\ncargo run ./testdata/bad.yaml\n```\n\noutput:\n\n```bash\n    Updating crates.io index\n   Compiling libc v0.2.69\n   Compiling bitflags v1.2.1\n   Compiling unicode-width v0.1.7\n   Compiling vec_map v0.8.1\n   Compiling linked-hash-map v0.5.2\n   Compiling strsim v0.8.0\n   Compiling ansi_term v0.11.0\n   Compiling textwrap v0.11.0\n   Compiling yaml-rust v0.4.3\n   Compiling atty v0.2.14\n   Compiling clap v2.33.0\n   Compiling ymlfxr v0.1.0 (/Users/bcsmit/go/src/github.com/xbcsmith/ymlfxr)\n    Finished dev [unoptimized + debuginfo] target(s) in 10.32s\n     Running `target/debug/ymlfxr bad.yaml`\n---\nname: foo\nversion: 0.1.0\nrelease: ~\ndescription: The foo package\nsummary: foo is the foo\nrequires:\n  - bar\n  - caz\nprovides:\n  - foo\ninstructions:\n  - unpack: tar -xvf foo-0.1.0.tar.xz \u0026\u0026 cd sharutils-0.1.0\n    pre: \"sed -i 's/bar/foo/g' Makefile.in\"\n    configure: \"./configure --prefix=/usr\"\n    build: make\n    test: make check\n    install: make install\n    post: \"\"\nsources:\n  - archive: foo-0.1.0.tar.xz\n    md5: d3b07384d113edec49eaa6238ad5ff00\n    sha256: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c\n    destination: /usr\n```\n\n```bash\nyamllint ./testdata/bad.yaml\n```\n\noutput:\n\n```bash\nbad.yaml\n  1:1       warning  missing document start \"---\"  (document-start)\n  7:1       error    wrong indentation: expected 2 but found 0  (indentation)\n  10:1      error    wrong indentation: expected 2 but found 0  (indentation)\n  12:1      error    wrong indentation: expected 2 but found 0  (indentation)\n  20:1      error    wrong indentation: expected 2 but found 0  (indentation)\n```\n\n```bash\ncargo run ./testdata/bad.yaml \u003e good.yaml\n```\n\n```bash\nyamllint good.yaml\n```\n\nno output!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbcsmith%2Fymlfxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxbcsmith%2Fymlfxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxbcsmith%2Fymlfxr/lists"}