ices-tools-prod / icesSAG

R interface to Stock Assessment Graphs database web services
http://sg.ices.dk/webservices.aspx
10 stars 7 forks source link

Development #195

Closed colinpmillar closed 4 years ago

lintr-bot commented 4 years ago

R/findAssessmentKey.R:37:65: style: Commas should always have a space after.

​    warning("Please check stock names for 'long dash' ", EmDash," and replace with -")
                                                                ^

R/getGraph.R:85:1: style: Variable and function names should not be longer than 30 characters.

​getFishingMortalityHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/getGraph.R:89:1: style: Variable and function names should not be longer than 30 characters.

​getRecruitmentHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:54:1: style: Lines should not be more than 120 characters.

​                  "<Assessment xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ICES_Standard_Graphs.xsd'>",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:178:23: warning: Avoid 1:length(...) expressions, use seq_len.

​  val_extra <- lapply(1:length(extra_cols), function(x) NA)
                      ^

R/SAGxml.R:349:22: warning: Avoid 1:length(...) expressions, use seq_len.

​    ending <- sapply(1:length(loc1), function(i) paste(ending[loc1[i]:loc2[i]], collapse = ""))
                     ^

R/utilities.R:248:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

​simplify <- function(x) {
^
lintr-bot commented 4 years ago

R/findAssessmentKey.R:37:65: style: Commas should always have a space after.

​    warning("Please check stock names for 'long dash' ", EmDash," and replace with -")
                                                                ^

R/getGraph.R:85:1: style: Variable and function names should not be longer than 30 characters.

​getFishingMortalityHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/getGraph.R:89:1: style: Variable and function names should not be longer than 30 characters.

​getRecruitmentHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:54:1: style: Lines should not be more than 120 characters.

​                  "<Assessment xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ICES_Standard_Graphs.xsd'>",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:178:23: warning: Avoid 1:length(...) expressions, use seq_len.

​  val_extra <- lapply(1:length(extra_cols), function(x) NA)
                      ^

R/SAGxml.R:349:22: warning: Avoid 1:length(...) expressions, use seq_len.

​    ending <- sapply(1:length(loc1), function(i) paste(ending[loc1[i]:loc2[i]], collapse = ""))
                     ^

R/utilities.R:248:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

​simplify <- function(x) {
^
lintr-bot commented 4 years ago

R/findAssessmentKey.R:37:65: style: Commas should always have a space after.

​    warning("Please check stock names for 'long dash' ", EmDash," and replace with -")
                                                                ^

R/getGraph.R:85:1: style: Variable and function names should not be longer than 30 characters.

​getFishingMortalityHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/getGraph.R:89:1: style: Variable and function names should not be longer than 30 characters.

​getRecruitmentHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:54:1: style: Lines should not be more than 120 characters.

​                  "<Assessment xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ICES_Standard_Graphs.xsd'>",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:178:23: warning: Avoid 1:length(...) expressions, use seq_len.

​  val_extra <- lapply(1:length(extra_cols), function(x) NA)
                      ^

R/SAGxml.R:349:22: warning: Avoid 1:length(...) expressions, use seq_len.

​    ending <- sapply(1:length(loc1), function(i) paste(ending[loc1[i]:loc2[i]], collapse = ""))
                     ^

R/utilities.R:248:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

​simplify <- function(x) {
^
lintr-bot commented 4 years ago

R/findAssessmentKey.R:37:65: style: Commas should always have a space after.

​    warning("Please check stock names for 'long dash' ", EmDash," and replace with -")
                                                                ^

R/getGraph.R:85:1: style: Variable and function names should not be longer than 30 characters.

​getFishingMortalityHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/getGraph.R:89:1: style: Variable and function names should not be longer than 30 characters.

​getRecruitmentHistoricalPerformance <- getLandingsGraph
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:54:1: style: Lines should not be more than 120 characters.

​                  "<Assessment xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ICES_Standard_Graphs.xsd'>",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/SAGxml.R:178:23: warning: Avoid 1:length(...) expressions, use seq_len.

​  val_extra <- lapply(1:length(extra_cols), function(x) NA)
                      ^

R/SAGxml.R:349:22: warning: Avoid 1:length(...) expressions, use seq_len.

​    ending <- sapply(1:length(loc1), function(i) paste(ending[loc1[i]:loc2[i]], collapse = ""))
                     ^

R/utilities.R:248:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

​simplify <- function(x) {
^