New Transformers: isort and standardrb

Hi there! We hope that you are loving Transformers. Appreciate all the feedback :slight_smile: As we continue to add support for more transformers, today we are releasing two of the most awaited ones:

  • isort: for making sure that all your imports are always in order.
  • StandardRB, a code formatter for Ruby.

How do I enable them?

Just add the following to your .deepsource.toml* file:

[[transformers]]
name = 'isort'
enabled = true

[[transformers]]
name = 'standardrb'
enabled = true

Missed our post on Transformers?

Here’s a summary: A DeepSource Transformer automatically ‘transforms’ all incoming source code in a repository with code auto-formatters. For all repositories which have at least one transformer enabled in config, if:

  • A commit is created on the default branch, DeepSource raises a Pull/Merge Request with transforming changes.
  • A new Pull/Merge Request is raised – we update the PR by adding a new commit on that branch.
    • Due to a limitation on GitHub, pushes to certain branches (like pull requests from other forks) are restricted. In this case, we recommend that you merge the PR directly. Once merged, DeepSource would automatically pick up the transformations introduced in the merge commit, and create a fresh PR.

Important Links:

Docs: https://deepsource.io/docs/transformer/
Transformers Release Notes: Transformers: Automatically format all incoming code

3 Likes