Home Developer Effective Scala Guide To Apply To Open Source Projects

Effective Scala Guide To Apply To Open Source Projects

Author

Date

Category

After allowing our users to simply enforce the Official Scala Style Guide on their projects, we are now very pleased to announce that we released the Effective Scala Standard on Codacy.

Effective Scala was created by Marius Eriksen and comes from Twitter’s experience with developing their whole infrastructure in Scala.

To enforce the Effective Scala rules on your project go to “Code Patterns” and select “Code Standards”.

Look at the results on this public Finagle project

But of course you can also only enable the rules that matter to your project.
Here are the rules that the Effective Scala is comprised of:

  • Avoid using reserved keywords
  • Call-by-name as last Arguments
  • Enforce class naming convention
  • Enforce curly braces
  • Enforce cyclomatic complexity
  • Enforce equals hashCode contract
  • Enforce grouping imports
  • Enforce imports at the top of the package
  • Enforce line max length
  • Enforce max method length
  • Enforce max number of methods
  • Enforce max number of parameters
  • Enforce method naming convention
  • Enforce minimum visibility in module values
  • Enforce object naming convention
  • Enforce package object naming convention
  • Enforce pattern matching over else-if nesting
  • Enforce return type of public methods
  • Enforce simplification of boolean expressions
  • Enforce sorting Imports alphabetically
  • Enforce usage of the Try object
  • Prohibit lowercase L in Long literals
  • Prohibit method names that contain their object name
  • Prohibit overriding clone() method
  • Prohibit overriding finalize() method
  • Prohibit standalone covariant equals
  • Prohibit structural types
  • Prohibit unnamed values on intermediate results and parameters
  • Prohibit whitespace after left bracket
  • Prohibit whitespace before left bracket

As Marius wrote “This is not the law, but deviation should be well justified”.

Happy Scala Coding!


For more Codacy resource on Scala see here.

Edit: We just published an ebook: “The Ultimate Guide to Code Review” based on a survey of 680+ developers. Enjoy!


About Codacy

Codacy is used by thousands of developers to analyze billions of lines of code every day!

Getting started is easy – and free! Just use your  GitHub, Bitbucket or Google account to sign up.

GET STARTED

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Recent posts

June Product Update: Bulk copy of patterns, new tools, and more. 🚀

Hi there 👋, If you don't receive our monthly newsletter, here's another chance to see what we've been up to...

A tale of four metrics

I’d like to share the story of a successful startup, whose engineering team more than doubled in the last year and how they used...

Automate Your Code Quality With Codacy – Website Planet

Jaime Jorge is a co-founder of Codacy – an automated code review that helps developers save time in code reviews and to tackle the...

May Product Update: Repository list, performance improvements, UX improvements, and more 🚀

Here are the product updates from May! This month we bring you new features, product improvements, and more interesting news to come. 🤩 We also...

April Product Update: New features and improvements, a recorded Codacy Analysis CLI webinar and more 🚀

Here are the product updates from April! This month we bring you new features, product improvements, a recorded Codacy Analysis CLI webinar we held,...