<commit_before><h2>
    Scala Clippy
    <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Scala%20Clippy%3A%20programmer-friendly%20compiler%20errors%20">Tweet</a>

    <a href="https://gitter.im/softwaremill/scala-clippy?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">
        <img src="https://badges.gitter.im/softwaremill/scala-clippy.svg" alt="Join the chat at https://gitter.im/softwaremill/scala-clippy" style="max-width:100%; margin-bottom:5px;" />
    </a>
</h2>

<p>
    Did you ever see a Scala compiler error such as:
</p>

<pre>
[error] TheNextFacebook.scala:16: type mismatch;
[error]  found   : akka.http.scaladsl.server.StandardRoute
[error]  required: akka.stream.scaladsl.Flow[akka.http.scaladsl.model.HttpRequest,akka.http.scaladsl.model.HttpResponse,Any]
[error]   Http().bindAndHandle(r, "localhost", 8080)
</pre>

<p>
    and had no idea what to do next? Well in this case, you need to provide an implicit instance of an <code>ActorMaterializer</code>,
    but the compiler isn't smart enough to be able to tell you that. Luckily, <strong>Scala Clippy is here to help</strong>!
</p>

<p>
    Just add the Scala Clippy compiler plugin, and you'll see this additional helpful message:
</p>

<pre>
[error]  Clippy advises: did you forget to define an implicit akka.stream.ActorMaterializer?
[error]  It allows routes to be converted into a flow.
[error]  You can read more at http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0/scala/http/routing-dsl/index.html
</pre>

<h2>Adding the plugin</h2>

<p>
    The easiest to use Clippy is via an SBT plugin. If you'd like Clippy to be enabled for all projects, without
    the need to modify their build, add the following to <code>~/.sbt/0.13/plugins/build.sbt</code>:
</p>

<pre>
addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.2.5")
</pre>

<p>
    Upon first use, the plugin will download the advice dataset from <code>https://scala-clippy.org</code> and store it
    in the <code>$HOME/.clippy</code> directory. The dataset will be updated at most once a day, in the background.
</p>

<h2>Contributing</h2>

<p>
    Help others users by submitting an advice for a compilation error that you have encountered!
    Just click "contribute" above and paste in your error!
</p>

<p>
    Alternatively, create an issue on <a href="https://github.com/softwaremill/scala-clippy">GitHub</a> or chat with
    us on <a href="https://gitter.im/softwaremill/scala-clippy?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">Gitter</a> in case of any doubts.
</p>

<p>
    Speaking of GitHub, you are also welcome to check out (and improve!) the plugin's &amp; website's
    <a href="https://github.com/softwaremill/scala-clippy">source code</a>.
</p>

<h2>Alternative ways to use Clippy</h2>

<p>
    You can also use Clippy directly as a compiler plugin. If you use SBT, add the following setting to your
    project's <code>.sbt</code> file:
</p>

<pre>
addCompilerPlugin("com.softwaremill.clippy" %% "plugin" % "0.2.5" classifier "bundle")
</pre>
<commit_msg>Add information about project-specific advices to the main site.<commit_after><h2>
    Scala Clippy
    <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Scala%20Clippy%3A%20programmer-friendly%20compiler%20errors%20">Tweet</a>

    <a href="https://gitter.im/softwaremill/scala-clippy?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">
        <img src="https://badges.gitter.im/softwaremill/scala-clippy.svg" alt="Join the chat at https://gitter.im/softwaremill/scala-clippy" style="max-width:100%; margin-bottom:5px;" />
    </a>
</h2>

<p>
    Did you ever see a Scala compiler error such as:
</p>

<pre>
[error] TheNextFacebook.scala:16: type mismatch;
[error]  found   : akka.http.scaladsl.server.StandardRoute
[error]  required: akka.stream.scaladsl.Flow[akka.http.scaladsl.model.HttpRequest,akka.http.scaladsl.model.HttpResponse,Any]
[error]   Http().bindAndHandle(r, "localhost", 8080)
</pre>

<p>
    and had no idea what to do next? Well in this case, you need to provide an implicit instance of an <code>ActorMaterializer</code>,
    but the compiler isn't smart enough to be able to tell you that. Luckily, <strong>Scala Clippy is here to help</strong>!
</p>

<p>
    Just add the Scala Clippy compiler plugin, and you'll see this additional helpful message:
</p>

<pre>
[error]  Clippy advises: did you forget to define an implicit akka.stream.ActorMaterializer?
[error]  It allows routes to be converted into a flow.
[error]  You can read more at http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0/scala/http/routing-dsl/index.html
</pre>

<h2>Adding the plugin</h2>

<p>
    The easiest to use Clippy is via an SBT plugin. If you'd like Clippy to be enabled for all projects, without
    the need to modify their build, add the following to <code>~/.sbt/0.13/plugins/build.sbt</code>:
</p>

<pre>
addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.2.5")
</pre>

<p>
    Upon first use, the plugin will download the advice dataset from <code>https://scala-clippy.org</code> and store it
    in the <code>$HOME/.clippy</code> directory. The dataset will be updated at most once a day, in the background.
</p>

<h2>Contributing</h2>

<p>
    Help others users by submitting an advice for a compilation error that you have encountered!
    Just click "contribute" above and paste in your error!
</p>

<p>
    Alternatively, create an issue on <a href="https://github.com/softwaremill/scala-clippy">GitHub</a> or chat with
    us on <a href="https://gitter.im/softwaremill/scala-clippy?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">Gitter</a> in case of any doubts.
</p>

<p>
    Speaking of GitHub, you are also welcome to check out (and improve!) the plugin's &amp; website's
    <a href="https://github.com/softwaremill/scala-clippy">source code</a>.
</p>

<h2>Project-specific advices</h2>

<p>
    If you have advice that you feel is too specific to be worth sharing on global database, you can add it to
    your project specific advice file. Just create a file named .clippy.json in the root of your project directory.
    See clippy <a href="https://github.com/softwaremill/scala-clippy#project-specific-advice">README</a> for an example.</p>

<h2>Alternative ways to use Clippy</h2>

<p>
    You can also use Clippy directly as a compiler plugin. If you use SBT, add the following setting to your
    project's <code>.sbt</code> file:
</p>

<pre>
addCompilerPlugin("com.softwaremill.clippy" %% "plugin" % "0.2.5" classifier "bundle")
</pre>

{'fraction_non_alphanumeric': 0.13189591078066915, 'fraction_numerical': 0.012193308550185874, 'mean_word_length': 4.32120253164557, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, 'https://': 17, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7030160', 'n_tokens_mistral': 2400, 'n_tokens_neox': 2279, 'n_words': 696}