Preparing report...

Report for github.com/syke99/tinygo-multi-i2c

(v0.1.0)

A    Great!    Found 13 issues across 15 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo93%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • multiDevice.go
    • Line 35: warning: cyclomatic complexity 24 of function NewDevice() is high (> 15) (gocyclo)

golint13%

Golint is a linter for Go source code.

    • blinkm.go
    • Line 3: warning: exported type Blinkm should have comment or be unexported (golint)
    • Line 14: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 30: warning: exported method Blinkm.Version should have comment or be unexported (golint)
    • Line 36: warning: exported method Blinkm.SetRGB should have comment or be unexported (golint)
    • Line 41: warning: exported method Blinkm.GetRGB should have comment or be unexported (golint)
    • Line 47: warning: exported method Blinkm.FadeToRGB should have comment or be unexported (golint)
    • Line 52: warning: exported method Blinkm.StopScript should have comment or be unexported (golint)
    • devices.go
    • Line 3: warning: exported type Devices should have comment or be unexported (golint)
    • ds3231.go
    • Line 7: warning: exported type Ds3231Mode should have comment or be unexported (golint)
    • Line 9: warning: exported type Ds3231 should have comment or be unexported (golint)
    • Line 20: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lps22hb.go
    • Line 3: warning: exported type Lps22hb should have comment or be unexported (golint)
    • Line 14: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • registers.go
    • Line 3: warning: comment on exported const Adx1345AddressLow should be of the form "Adx1345AddressLow ..." (golint)
    • Line 5: warning: exported const Adx1345AddressHigh should have comment or be unexported (golint)
    • Line 8: warning: comment on exported const ADX1345_RATE_3200HZ should be of the form "ADX1345_RATE_3200HZ ..." (golint)
    • Line 10: warning: exported const ADX1345_RATE_1600HZ should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: comment on exported const ADX1345_RANGE_2G should be of the form "ADX1345_RANGE_2G ..." (golint)
    • Line 64: warning: comment on exported const Amg88xxAddressHigh should be of the form "Amg88xxAddressHigh ..." (golint)
    • Line 66: warning: exported const Amg88xxAddressLow should have comment or be unexported (golint)
    • Line 69: warning: exported const AMG88XX_PCTL should have comment (or a comment on this block) or be unexported (golint)
    • Line 87: warning: comment on exported const AMG88XX_NORMAL_MODE should be of the form "AMG88XX_NORMAL_MODE ..." (golint)
    • Line 93: warning: comment on exported const AMG88XX_FLAG_RESET should be of the form "AMG88XX_FLAG_RESET ..." (golint)
    • Line 97: warning: comment on exported const AMG88XX_FPS_10 should be of the form "AMG88XX_FPS_10 ..." (golint)
    • Line 101: warning: comment on exported const AMG88XX_DIFFERENCE should be of the form "AMG88XX_DIFFERENCE ..." (golint)
    • Line 109: warning: comment on exported const At24cxAddress should be of the form "At24cxAddress ..." (golint)
    • Line 112: warning: comment on exported const Bh1750Address should be of the form "Bh1750Address ..." (golint)
    • Line 116: warning: exported const BH1750_POWER_DOWN should have comment (or a comment on this block) or be unexported (golint)
    • Line 126: warning: comment on exported const BH1750_HIGH_RES should be of the form "BH1750_HIGH_RES ..." (golint)
    • Line 132: warning: comment on exported const BlinkmAddress should be of the form "BlinkmAddress ..." (golint)
    • Line 136: warning: exported const BLINKM_TO_RGB should have comment (or a comment on this block) or be unexported (golint)
    • Line 151: warning: comment on exported const Bme280Address should be of the form "Bme280Address ..." (golint)
    • Line 155: warning: exported const BME280_CTRL_MEAS_ADDR should have comment (or a comment on this block) or be unexported (golint)
    • Line 169: warning: exported const BME280_SEALEVEL_PRESSURE should have comment (or a comment on this block) or be unexported (golint)
    • Line 172: warning: comment on exported const Bmp280Address should be of the form "Bmp280Address ..." (golint)
    • Line 176: warning: exported const BMP280_REG_ID should have comment (or a comment on this block) or be unexported (golint)
    • Line 190: warning: exported const BMP280_SAMPLING_SKIPPED should have comment (or a comment on this block) or be unexported (golint)
    • Line 199: warning: exported const BMP280_MODE_SLEEP should have comment (or a comment on this block) or be unexported (golint)
    • Line 205: warning: exported const BMP280_STANDBY_1MS should have comment (or a comment on this block) or be unexported (golint)
    • Line 216: warning: exported const BMP280_FILTER_OFF should have comment (or a comment on this block) or be unexported (golint)
    • Line 223: warning: comment on exported const Ds3231Address should be of the form "Ds3231Address ..." (golint)
    • Line 227: warning: exported const DS3231_REG_TIMEDATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 240: warning: comment on exported const DS3231_A1IE should be of the form "DS3231_A1IE ..." (golint)
    • Line 250: warning: comment on exported const DS3231_A1F should be of the form "DS3231_A1F ..." (golint)
    • Line 257: warning: don't use underscores in Go names; const DS3231_AlarmFlag_Alarm1 should be DS3231AlarmFlagAlarm1 (golint)
    • Line 258: warning: don't use underscores in Go names; const DS3231_AlarmFlag_Alarm2 should be DS3231AlarmFlagAlarm2 (golint)
    • Line 259: warning: don't use underscores in Go names; const DS3231_AlarmFlag_AlarmBoth should be DS3231AlarmFlagAlarmBoth (golint)
    • Line 261: warning: don't use underscores in Go names; const DS3231_None should be DS3231None (golint)
    • Line 262: warning: don't use underscores in Go names; const DS3231_BatteryBackup should be DS3231BatteryBackup (golint)
    • Line 263: warning: don't use underscores in Go names; const DS3231_Clock should be DS3231Clock (golint)
    • Line 264: warning: don't use underscores in Go names; const DS3231_AlarmOne should be DS3231AlarmOne (golint)
    • Line 265: warning: don't use underscores in Go names; const DS3231_AlarmTwo should be DS3231AlarmTwo (golint)
    • Line 266: warning: don't use underscores in Go names; const DS3231_ModeAlarmBoth should be DS3231ModeAlarmBoth (golint)
    • Line 269: warning: comment on exported const Ina250Address should be of the form "Ina250Address ..." (golint)
    • Line 273: warning: exported const INA250_REG_CONFIG should have comment (or a comment on this block) or be unexported (golint)
    • Line 290: warning: exported const LIS3DH_WHO_AM_I should have comment (or a comment on this block) or be unexported (golint)
    • Line 332: warning: exported const LIS3DH_RANGE_16_G should have comment (or a comment on this block) or be unexported (golint)
    • Line 338: warning: exported type Lis3dhDataRate should have comment or be unexported (golint)
    • Line 354: warning: comment on exported const Lps22hbAddress should be of the form "Lps22hbAddress ..." (golint)
    • Line 358: warning: exported const LPS22HB_WHO_AM_I_REG should have comment (or a comment on this block) or be unexported (golint)
    • Line 366: warning: comment on exported const Mpu6050Address should be of the form "Mpu6050Address ..." (golint)
    • Line 370: warning: comment on exported const MPU6050_SELF_TEST_X should be of the form "MPU6050_SELF_TEST_X ..." (golint)
    • Line 372: warning: exported const MPU6050_SELF_TEST_Y should have comment (or a comment on this block) or be unexported (golint)
    • Line 382: warning: comment on exported const MPU6050_I2C_MST_CTRL should be of the form "MPU6050_I2C_MST_CTRL ..." (golint)
    • Line 403: warning: comment on exported const MPU6050_INT_PIN_CFG should be of the form "MPU6050_INT_PIN_CFG ..." (golint)
    • Line 408: warning: comment on exported const MPU6050_ACCEL_XOUT_H should be of the form "MPU6050_ACCEL_XOUT_H ..." (golint)
    • Line 416: warning: comment on exported const MPU6050_TEMP_OUT_H should be of the form "MPU6050_TEMP_OUT_H ..." (golint)
    • Line 420: warning: comment on exported const MPU6050_GYRO_XOUT_H should be of the form "MPU6050_GYRO_XOUT_H ..." (golint)
    • Line 428: warning: comment on exported const MPU6050_EXT_SENS_DATA_00 should be of the form "MPU6050_EXT_SENS_DATA_00 ..." (golint)
    • Line 454: warning: comment on exported const MPU6050_I2C_PER0_DO should be of the form "MPU6050_I2C_PER0_DO ..." (golint)
    • amg88xx.go
    • Line 7: warning: exported type Amg88xxInterruptMode should have comment or be unexported (golint)
    • Line 9: warning: exported type Amg88xx should have comment or be unexported (golint)
    • Line 23: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 56: warning: exported method Amg88xx.SetPCTL should have comment or be unexported (golint)
    • Line 60: warning: exported method Amg88xx.SetReset should have comment or be unexported (golint)
    • Line 64: warning: exported method Amg88xx.SetFrameRate should have comment or be unexported (golint)
    • Line 68: warning: exported method Amg88xx.SetMovingAverageMode should have comment or be unexported (golint)
    • Line 76: warning: exported method Amg88xx.SetInterruptLevels should have comment or be unexported (golint)
    • Line 80: warning: exported method Amg88xx.SetInterruptLevelsHysteresis should have comment or be unexported (golint)
    • Line 112: warning: exported method Amg88xx.EnableInterrupt should have comment or be unexported (golint)
    • Line 117: warning: exported method Amg88xx.DisableInterrupt should have comment or be unexported (golint)
    • Line 122: warning: exported method Amg88xx.SetInterruptMode should have comment or be unexported (golint)
    • Line 127: warning: exported method Amg88xx.GetInterrupt should have comment or be unexported (golint)
    • Line 133: warning: exported method Amg88xx.ClearInterrupt should have comment or be unexported (golint)
    • Line 137: warning: exported method Amg88xx.ReadThermistor should have comment or be unexported (golint)
    • bh1750.go
    • Line 7: warning: exported type Bh1750 should have comment or be unexported (golint)
    • Line 20: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 38: warning: exported method Bh1750.RawSensorData should have comment or be unexported (golint)
    • Line 45: warning: exported method Bh1750.Illuminance should have comment or be unexported (golint)
    • Line 61: warning: exported method Bh1750.SetMode should have comment or be unexported (golint)
    • bmp280.go
    • Line 30: warning: exported type Bmp280 should have comment or be unexported (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 101: warning: exported method Bmp280.Reset should have comment or be unexported (golint)
    • Line 105: warning: exported method Bmp280.ReadTemperature should have comment or be unexported (golint)
    • Line 127: warning: exported method Bmp280.ReadPressure should have comment or be unexported (golint)
    • lis3dh.go
    • Line 3: warning: exported type Lis3dhRange should have comment or be unexported (golint)
    • Line 4: warning: exported type Lis3dhRate should have comment or be unexported (golint)
    • Line 6: warning: exported type Lis3dh should have comment or be unexported (golint)
    • Line 18: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: exported method Lis3dh.SetDataRate should have comment or be unexported (golint)
    • Line 83: warning: exported method Lis3dh.ReadRange should have comment or be unexported (golint)
    • mpu6050.go
    • Line 3: warning: exported type Mpu6050 should have comment or be unexported (golint)
    • Line 14: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • multiDevice.go
    • Line 31: warning: comment on exported function NewDevice should be of the form "NewDevice ..." (golint)
    • Line 67: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 75: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 83: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 91: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 99: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 107: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 115: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 123: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 131: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 139: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • adxl345.go
    • Line 3: warning: exported type Adxl345Range should have comment or be unexported (golint)
    • Line 4: warning: exported type Adxl345Rate should have comment or be unexported (golint)
    • Line 31: warning: exported type Adxl345 should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • bme280.go
    • Line 28: warning: exported type Bme280 should have comment or be unexported (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: exported method Bme280.Reset should have comment or be unexported (golint)
    • Line 104: warning: exported method Bme280.ReadTemperature should have comment or be unexported (golint)
    • Line 114: warning: exported method Bme280.ReadPressure should have comment or be unexported (golint)
    • Line 124: warning: exported method Bme280.ReadHumidity should have comment or be unexported (golint)
    • Line 134: warning: exported method Bme280.ReadAltitude should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!