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

Unused (and untested) functions in run/idp-sql #2047

Closed
fhinkel opened this issue Nov 5, 2020 · 2 comments
Closed

Unused (and untested) functions in run/idp-sql #2047

fhinkel opened this issue Nov 5, 2020 · 2 comments
Assignees
Labels
type: cleanup An internal cleanup or hygiene concern.

Comments

@fhinkel
Copy link
Contributor

fhinkel commented Nov 5, 2020

There are some unused functions in run/idp-sql.
Some are not covered by region tags so we should be able to delete them. Those inside region tags should have test coverage and thus not show up as unused.

$ npm run lint
nodejs-docs-samples/run/idp-sql/static/config.js
  2:7  warning  'config' is assigned a value but never used  no-unused-vars

nodejs-docs-samples/run/idp-sql/static/firebase.js
  22:10  warning  'signIn' is defined but never used  no-unused-vars
  40:16  warning  'vote' is defined but never used    no-unused-vars
@fhinkel fhinkel added the type: cleanup An internal cleanup or hygiene concern. label Nov 5, 2020
@averikitsch
Copy link
Contributor

All of these variables and functions are used but organized specifically into different files for client side code. Can I opt these files out?

@fhinkel
Copy link
Contributor Author

fhinkel commented Nov 6, 2020

We can opt out (which we're doing right now with .eslintrc in the run/idp-sql folder. Thanks for clarifying, I didn't realize they're used in fronttend code. Ideally, we would have tests for those functions, but then we'd need a bundler and it would probably convolute the sample too much.

@fhinkel fhinkel closed this as completed Nov 6, 2020
gcf-merge-on-green bot pushed a commit that referenced this issue Nov 6, 2020
see #2047

`signOut` and `toggle` are not used, not exported, and not within region tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

2 participants