inaka / elvis

Erlang Style Reviewer
Apache License 2.0
426 stars 87 forks source link

elvis_core violates OTP naming conventions #491

Closed jesperes closed 4 years ago

jesperes commented 6 years ago

According to OTP naming conventions (see http://erlang.org/doc/design_principles/applications.html#directory-structure), the application resource file is supposed to be src/${application}.app.src, but for elvis_core this file is called src/elvis.app.src. Also, the file contents specifies the application name to be "elvis" instead of "elvis_core".

  application, elvis,
  [
   {pkg_name, elvis_core},
...

This means that we cannot start the elvis_core application as documented by doing application:start(elvis_core).:

===> Verifying dependencies...
===> Compiling elvis
Erlang/OTP 19 Klarna-g270c04d412 [erts-8.3.5.4] [source-270c04d412] [64-bit] [smp:4:4] [async-threads:1] [hipe] [kernel-poll:false]

Eshell V8.3.5.4  (abort with ^G)
1> application:start(elvis_core).
{error,{"no such file or directory","elvis_core.app"}}
2> 
elbrujohalcon commented 6 years ago

That's because the application in that repository (http://github.com/inaka/elvis_core), despite the repo's name, is actually elvis. The problem arose when we split elvis_core from this repo (http://github.com/inaka/elvis). We couldn't change this repo's name because there were links pointing to files living here, but this app is not elvis, this one is now called elvis_shell. 🤦‍♂️ Terribly confusing, I know. It's something we do want to change eventually, but we're not entirely sure when we'll get there since it requires a bunch of additional changes in several different repos.

elbrujohalcon commented 6 years ago

I adjusted the README.md in inaka/elvis_core#105 but I'll leave this ticket open since we do have the desire to fix it properly.

jesperes commented 6 years ago

Ok, so the application in the elvis_core repo is elvis, and the application in the elvis repo is elvis_shell. Confusing, but I can live with that.

paulo-ferraz-oliveira commented 4 years ago

Milestone removed, since 0.5.0 is in the past.

jfacorro commented 4 years ago

This was fixed in 0.5.0, elvis and elvis_core have the correct names in their .app.src, so we can close this.