Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for unused fields in records #117

Closed
HernanRivasAcosta opened this issue Sep 15, 2014 · 3 comments
Closed

Check for unused fields in records #117

HernanRivasAcosta opened this issue Sep 15, 2014 · 3 comments
Labels

Comments

@HernanRivasAcosta
Copy link
Member

Records can grow stale and end up with unused fields that only serve to add clutter and confuse programmers implying the code does some things or considers certain variables that it doesn't.

@jfacorro jfacorro added the rule label Sep 15, 2014
@amilkr amilkr removed the rule label Oct 8, 2015
@paulo-ferraz-oliveira
Copy link
Collaborator

By "unused fields" do you mean "fields that aren't ever set"?

I see the following:

  1. fields might be set in the context of one app. and read by another app., though they may also be set "by default",
  2. fields might be read by an app. that is outside the context of compilation (so checking if they are read in that context is, indeed, not enough),
  3. if a record is exported (e.g. via a function) it may be set by an external app. and then read.

I find this rule kind of hard to reason about, but probably with a proper list of requirements we'd be able to tackle it.

e.g. we could start by tackling records that aren't exposed outside of a module (thus excluding .hrl) - if they are opaque, they are supposedly easier to reason about, regarding this rule.

@elbrujohalcon
Copy link
Member

There will be a solution for this… in a different project that I can't disclose much about… 🙄 … yet.
So, yeah… this ticket can be closed.

@paulo-ferraz-oliveira
Copy link
Collaborator

There will be a solution for this… in a different project that I can't disclose much about… 🙄 … yet.
So, yeah… this ticket can be closed.

Oh, the suspense... :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants