elixir-sqlite/sqlitex

Start Fixing Dogma Violations

mmmries opened this issue · 3 comments

I just added dogma to the project and set it up to run at the end of each Travis build. As you can see we have a lot of violations right now. Most of them are for long lines (perhaps we should consider how long we want our lines to be?), but they also include a lot undocumented modules.

I don't want to add dogma as a requirement for Travis to pass, but a lot of these violations should probably be cleaned up.

I don't put much stock in the LineLength violations of >80 chars. The creator of PEP8 even admits that for python he wishes he had made the rule "90-ish" [1]. Given how verbose structure definitions can be (%__MODULE__{structure | foo: bar}, etc.), I'm not sure yet what the ideal maximum line length for Elixir would be, but 80 seems on the low side. Having said that, I'm sure some of the >100 char lines can be made clearer. It looks like dogma can be configured with a max_length option, so we can adjust it to the best length for Sqlitex.

Additionally, I'd also have dogma ignore the test directory or at the very least the test/test_database.exs file because that file was auto-generated from the original sqlite database.

I hope to take a look at the violations in more detail this weekend and start fixing them.

#31 take a first stab at this and removes the big majority of these violations. I think the rest we can clean up as we go

In #35 I am proposing that we actually drop Dogma from the project. Curious to know if anyone else likes using it or is getting a lot of mileage out of having it in the project.