go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.57k stars 571 forks source link

Wrong triggering error "Non-integer size argument to make" #2132

Closed linniksa closed 8 years ago

linniksa commented 8 years ago
package main

import "fmt"

func main() {
    type test uint32
    foo := make([]int, test(2))
    fmt.Println(foo)
}
package main

import "fmt"

func main() {
    foo := make([]int, uint64(2))
    fmt.Println(foo)
}
ignatov commented 8 years ago

@sjamesr Please take a look.

sjamesr commented 8 years ago

@linniksa thank you for the report, the fix is in review now

uvwild commented 6 years ago

still happeing in 2018.1 EAP in an example file: https://github.com/manuelkiessling/go-cleanarchitecture/blob/96a022b6127638236963ed8f00acc499300a7b70/src/usecases/usecases.go

i disabled all inspections... its still there.... very frustrating.... when I cannot disable false positives the inspections become a bit useless....

dlsniper commented 6 years ago

@uvwild I cannot replicate your problem with 2018.1 EAP. It is likely a problem generated by your configuration of the GOPATH, as that repository is "special" in terms of handling that and the author decided to roll his own layout.

Please observe the correct configuration in the IDE for the GOPATH and open the project root directory in the same place as the GOPATH is pointing out.

Furthermore, please open any further issues or comments on: https://youtrack.jetbrains.com/issues/Go as this tracker is not the correct place to do so.

2018-02-10