{"id":15405298,"url":"https://github.com/ydah/slimembedcop","last_synced_at":"2025-04-17T00:57:51.166Z","repository":{"id":182740461,"uuid":"668995685","full_name":"ydah/slimembedcop","owner":"ydah","description":"RuboCop runner for Ruby code embedded in Slim.","archived":false,"fork":false,"pushed_at":"2025-03-18T15:32:42.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T05:51:13.378Z","etag":null,"topics":["gem","hacktoberfest","rubocop","ruby","slim"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ydah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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,"publiccode":null,"codemeta":null},"funding":{"github":"ydah"}},"created_at":"2023-07-21T05:18:22.000Z","updated_at":"2025-03-18T15:32:45.000Z","dependencies_parsed_at":"2025-03-18T16:31:02.698Z","dependency_job_id":"53876431-bb06-4b41-8428-811de5614087","html_url":"https://github.com/ydah/slimembedcop","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":0.02941176470588236,"last_synced_commit":"b7345f6445584e8b2e88bb0dbc262b9f2359eec5"},"previous_names":["ydah/slimembedcop"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslimembedcop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslimembedcop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslimembedcop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslimembedcop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/slimembedcop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249295884,"owners_count":21246211,"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":["gem","hacktoberfest","rubocop","ruby","slim"],"created_at":"2024-10-01T16:15:59.341Z","updated_at":"2025-04-17T00:57:51.147Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","readme":"# SlimEmbedCop\n\n[![Gem Version](https://badge.fury.io/rb/slimembedcop.svg)](https://badge.fury.io/rb/slimembedcop)\n[![CI](https://github.com/ydah/slimembedcop/actions/workflows/ci.yml/badge.svg)](https://github.com/ydah/slimembedcop/actions/workflows/ci.yml)\n[![RubyDoc](https://img.shields.io/badge/%F0%9F%93%9ARubyDoc-documentation-informational.svg)](https://www.rubydoc.info/gems/slimembedcop)\n\n\n[RuboCop](https://github.com/rubocop/rubocop) runner for [Ruby code embedded in Slim](https://github.com/slim-template/slim#embedded-engines-markdown-).\n\n## Installation\n\n**SlimEmbedCop**'s installation is pretty standard:\n\n```sh\n% gem install slimembedcop\n```\n\nIf you'd rather install SlimEmbedCop using `bundler`, add a line for it in your `Gemfile` (but set the `require` option to `false`, as it is a standalone tool):\n\n```ruby\ngem 'slimembedcop', require: false\n```\n\n## Usage\n\nUse `slimembedcop` executable to check offenses and autocorrect them.\n[RuboCop's cop](https://docs.rubocop.org/rubocop/1.56/cops.html) or any [custom cop](https://docs.rubocop.org/rubocop/extensions.html#custom-cops) you create can also be used with `slimembedcop`.\n\n```sh\n% exe/slimembedcop --help\nUsage: slimembedcop [options] [file1, file2, ...]\n    -v, --version                    Display version.\n    -a, --autocorrect                Autocorrect offenses.\n    -c, --config=                    Specify configuration file.\n        --[no-]color                 Force color output on or off.\n    -d, --debug                      Display debug info.\n```\n\n### Example\n\nYou have a Slim file like this:\n\n```ruby\nruby:\n  message = \"world\"\nhtml\n  head\n    title Slim Samples\n  body\n    ruby:\n      if some_var = true\n        do_something\n      end\n    h1 Hello, #{message}\nruby:\n  do_something /pattern/i\n```\n\nWhen executed, it outputs the following offenses:\n\n```sh\n% slimembedcop dummy.slim\nInspecting 1 file\nW\n\nOffenses:\n\ndummy.slim:2:13: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.\n  message = \"world\"\n            ^^^^^^^\ndummy.slim:8:19: W: [Correctable] Lint/AssignmentInCondition: Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.\n      if some_var = true\n                  ^\ndummy.slim:13:16: W: [Correctable] Lint/AmbiguousRegexpLiteral: Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the / if it should be a division.\n  do_something /pattern/i\n               ^\n\n1 file inspected, 3 offenses detected, 3 offenses autocorrectable\n```\n\n## Configuration\n\nThe behavior of [RuboCop](https://github.com/rubocop/rubocop) can be controlled via the [.rubocop.yml](https://github.com/rubocop/rubocop/blob/master/.rubocop.yml) configuration file. The behavior of `SlimEmbedCop` can be controlled by the `.slimembedcop.yml` configuration file. It makes it possible to enable/disable certain cops (checks) and to alter their behavior if they accept any parameters. The file can be placed in your home directory, XDG config directory, or in some project directory.\n\nThe file has the following format:\n\n```yaml\ninherit_from: ../.rubocop.yml\n\nStyle/Encoding:\n  Enabled: false\n\nLayout/LineLength:\n  Max: 99\n```\n\nNOTE: It is basically the same as RuboCop's. Please check [Configuration](https://docs.rubocop.org/rubocop/configuration.html) for details.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":["https://github.com/sponsors/ydah"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fslimembedcop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Fslimembedcop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fslimembedcop/lists"}