Skip to content

Instantly share code, notes, and snippets.

@yu-iskw
Last active August 29, 2015 14:25
The result of lint-r for SPARK-9121 at the revision:1ddd0f2f1688560f88470e312b72af04364e2d49 when I have sent a PR
inst/tests/test_binary_function.R:43:6: style: Put spaces around all infix operators.
  rdd<- map(text.rdd, function(x) {x})
    ~^
inst/tests/test_rdd.R:253:59: style: Place a space before left parenthesis, except in a function call.
  actual <- collect(flatMapValues(intRdd, function(x) { x:(x + 1) }))
                                                          ^
inst/tests/test_rdd.R:296:26: style: Put spaces around all infix operators.
  func <- function(x) { x*x }
                        ~^~
inst/tests/test_rdd.R:314:21: style: Put spaces around all infix operators.
  expect_true(count >=0 && count <= 4)
                    ^~~
inst/tests/test_sparkSQL.R:115:3: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  }, error = function(err) {
  ^
inst/tests/test_sparkSQL.R:130:1: style: lines should not be more than 100 characters.
  localDF <- data.frame(name=c("John", "Smith", "Sarah"), age=c(19, 23, 18), height=c(164.10, 181.4, 173.7))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inst/tests/test_sparkSQL.R:605:3: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  }, error = function(err) {
  ^
inst/tests/test_sparkSQL.R:667:80: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[1, "HYPOT(a, b)"], sqrt(1^2 + 5^2))
                                                                              ~^~
inst/tests/test_sparkSQL.R:667:86: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[1, "HYPOT(a, b)"], sqrt(1^2 + 5^2))
                                                                                    ~^~
inst/tests/test_sparkSQL.R:668:80: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[2, "HYPOT(a, b)"], sqrt(2^2 + 6^2))
                                                                              ~^~
inst/tests/test_sparkSQL.R:668:86: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[2, "HYPOT(a, b)"], sqrt(2^2 + 6^2))
                                                                                    ~^~
inst/tests/test_sparkSQL.R:669:80: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[3, "HYPOT(a, b)"], sqrt(3^2 + 7^2))
                                                                              ~^~
inst/tests/test_sparkSQL.R:669:86: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[3, "HYPOT(a, b)"], sqrt(3^2 + 7^2))
                                                                                    ~^~
inst/tests/test_sparkSQL.R:670:80: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[4, "HYPOT(a, b)"], sqrt(4^2 + 8^2))
                                                                              ~^~
inst/tests/test_sparkSQL.R:670:86: style: Put spaces around all infix operators.
  expect_equal(collect(select(df, hypot(df$a, df$b)))[4, "HYPOT(a, b)"], sqrt(4^2 + 8^2))
                                                                                    ~^~
inst/tests/test_sparkSQL.R:877:43: style: Put spaces around all infix operators.
  expect_equal(count(parquetDF), count(df)*2)
                                         ~^~
R/column.R:68:21: style: Put spaces around all infix operators.
binary_mathfunctions<- c("atan2", "hypot")
                   ~^
R/context.R:124:31: style: Place a space before left parenthesis, except in a function call.
  slices <- split(coll, rep(1:(numSlices + 1), each = sliceLen)[1:length(coll)])
                              ^
R/DataFrame.R:1325:18: style: Place a space before left parenthesis, except in a function call.
            if (!(mode %in% allModes)) {
                 ^
R/DataFrame.R:1387:18: style: Place a space before left parenthesis, except in a function call.
            if (!(mode %in% allModes)) {
                 ^
R/deserialize.R:105:3: warning: local variable ‘data’ assigned but may not be used
  data <- readBin(con, raw(), as.integer(dataLen), endian = "big")
  ^~~~
R/deserialize.R:109:3: warning: local variable ‘data’ assigned but may not be used
  data <- readBin(con, raw(), as.integer(dataLen), endian = "big")
  ^~~~
R/generics.R:254:35: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  standardGeneric("intersection") })
                                  ^
R/generics.R:553:40: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  standardGeneric("withColumnRenamed") })
                                       ^
R/pairRDD.R:206:63: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
                                   get(name, .broadcastNames) })
                                                              ^
R/pairRDD.R:882:27: style: Place a space before left parenthesis, except in a function call.
                      res[(len + 1):(len + count)] <- rep(list(elem), count)
                          ^
R/pairRDD.R:882:37: style: Place a space before left parenthesis, except in a function call.
                      res[(len + 1):(len + count)] <- rep(list(elem), count)
                                    ^
R/RDD.R:88:6: style: Place a space before left parenthesis, except in a function call.
    !(e$isCached || e$isCheckpointed)
     ^
R/RDD.R:100:32: style: Place a space before left parenthesis, except in a function call.
      func(partIndex, prev@func(partIndex, part))
                               ^
R/RDD.R:844:25: style: Place a space before left parenthesis, except in a function call.
                    res[(len + 1):(len + count)] <- rep(list(elem), count)
                        ^
R/RDD.R:844:35: style: Place a space before left parenthesis, except in a function call.
                    res[(len + 1):(len + count)] <- rep(list(elem), count)
                                  ^
R/RDD.R:1264:15: style: Words within variable and function names should be separated by '_' rather than '.'.
              trim.trailing.func <- function(x) {
              ^~~~~~~~~~~~~~~~~~
R/RDD.R:1267:44: style: Words within variable and function names should be separated by '_' rather than '.'.
              input <- unlist(lapply(part, trim.trailing.func))
                                           ^~~~~~~~~~~~~~~~~~
R/RDD.R:1269:27: style: Words within variable and function names should be separated by '_' rather than '.'.
              lapply(res, trim.trailing.func)
                          ^~~~~~~~~~~~~~~~~~
R/sparkR.R:25:3: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  }, error = function(err) {
  ^
R/sparkR.R:107:3: warning: local variable ‘sparkMem’ assigned but may not be used
  sparkMem <- Sys.getenv("SPARK_MEM", "1024m")
  ^~~~~~~~
R/sparkR.R:113:5: warning: local variable ‘collapseChar’ assigned but may not be used
    collapseChar <- ":"
    ^~~~~~~~~~~~
R/sparkR.R:159:3: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  }, error = function(err) {
  ^
R/sparkR.R:270:3: style: Closing curly-braces should always be on their own line, unless it's followed by an else.
  }, error = function(err) {
  ^
R/utils.R:35:14: style: Place a space before left parenthesis, except in a function call.
    lapply(0:(arrSize - 1),
             ^
R/utils.R:575:26: style: Place a space before left parenthesis, except in a function call.
          values <- part[(lengthOfKeys + 1) : (len - 1)]
                         ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment