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

CreateCommSpeciesTable.R function #63

Open
Kasia-MIR opened this issue Sep 18, 2020 · 1 comment
Open

CreateCommSpeciesTable.R function #63

Kasia-MIR opened this issue Sep 18, 2020 · 1 comment
Assignees

Comments

@Kasia-MIR
Copy link
Contributor

Hi,
You can find CreateCommSpeciesTable.R function in my personal folder
[https://github.com/ices-eg/WK_RDBES/tree/master/WKRDB-EST2/subgroup4/personal/Kasia]
All the best,
Kasia

@rix133
Copy link
Contributor

rix133 commented Sep 18, 2020

To see the styling errors by line do (in Rstudio):
fName <- "./WKRDB-EST2/subgroup4/personal/Kasia/CreateCommSpeciesTable.R" lintr::lint(fName,linters=lintr::with_defaults(object_name_linter=lintr::object_name_linter(styles = "camelCase")))

Unique styling issues identified:

  • Variable and function name style should be camelCase.
  • Put spaces around all infix operators.
  • Lines should not be more than 80 characters.
  • Only use double-quotes.
  • Commas should always have a space after.
  • functions should have cyclomatic complexity of less than 15
  • Remove spaces before the left parenthesis in a function call.
  • There should be a space between right parenthesis and an opening curly brace.
  • no visible binding for global variable 'SAsequenceNumber'
  • Avoid 1:nrow(...) expressions, use seq_len.
  • Opening curly braces should never go on their own line and should always be followed by a new line.
  • Trailing whitespace is superfluous.
  • no visible binding for global variable 'SAid'
  • no visible binding for global variable 'SAparentSequenceNumbe'
  • no visible binding for global variable 'SAparentSequenceNumber'
  • Place a space before left parenthesis, except in a function call.
  • Do not place spaces around code in parentheses or square brackets.
  • no visible binding for global variable 'SAunitType'
  • local variable 'cos' assigned but may not be used
  • Avoid 1:length(...) expressions, use seq_len.
  • Commas should never have a space before.
  • local variable 'CommercialSampleNew' assigned but may not be used

You can use also auto styler to fix some.
Unique lint issues after running styler::style_file(fName):

  • Variable and function name style should be camelCase.
  • Lines should not be more than 80 characters.
  • functions should have cyclomatic complexity of less than 15
  • no visible binding for global variable 'SAsequenceNumber'
  • Avoid 1:nrow(...) expressions, use seq_len.
  • Opening curly braces should never go on their own line and should always be followed by a new line.
  • no visible binding for global variable 'SAid'
  • no visible binding for global variable 'SAparentSequenceNumbe'
  • no visible binding for global variable 'SAparentSequenceNumber'
  • no visible binding for global variable 'SAunitType'
  • local variable 'cos' assigned but may not be used
  • Avoid 1:length(...) expressions, use seq_len.
  • local variable 'CommercialSampleNew' assigned but may not be used

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

No branches or pull requests

3 participants