Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shopiqo/docker-rbprettier
Docker images for Prettier plugin for Ruby + Guesslang
https://github.com/shopiqo/docker-rbprettier
codequality continuous-integration docker guesslang pre-commit prettier ruby tenserflow vagrantfile
Last synced: 27 days ago
JSON representation
Docker images for Prettier plugin for Ruby + Guesslang
- Host: GitHub
- URL: https://github.com/shopiqo/docker-rbprettier
- Owner: shopiqo
- Created: 2021-12-28T19:40:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-30T19:57:29.000Z (about 3 years ago)
- Last Synced: 2024-10-21T03:30:32.481Z (3 months ago)
- Topics: codequality, continuous-integration, docker, guesslang, pre-commit, prettier, ruby, tenserflow, vagrantfile
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prettier for Ruby inside Docker
Docker images to auto-format Ruby source code based on [Prettier Ruby Plugin](https://github.com/prettier/plugin-ruby) and [Guesslang](https://guesslang.readthedocs.io/en/latest/). Most available solutions out there aren't able to determine correct programming language unless you are using file extensions like `*.rb`, `*.gemspec` or `Gemfile`. That's why we are using Guesslang to detect Ruby source code with much better accuracy. The accuracy of the official plugin is not enough because it doesn't detects for example `Vagrantfile` as Ruby source code.
## Quickstart
### Standalone
```bash
docker run --rm -v $(pwd):/src ghcr.io/efsa-io/rbprettier:v1.0.1
```### pre-commit (recommended)
Here is an example for your `pre-commit-config.yaml`:
```yaml
[…]
repos:
- repo: local
hooks:
- id: rbprettier
name: rbprettier
language: docker_image
entry: ghcr.io/efsa-io/rbprettier:v1.0.1
[…]
```## Contribute
### pre-commit
```bash
pre-commit install
```### local testing
```bash
docker build --no-cache -t rbprettier .
mkdir tests
echo 'puts "Hello world!"' > tests/hello.rb
docker run --rm -v $(pwd):/src rbprettier
```