Hey, thanks for the report. This looks like a file association issue: Cursor is mistakenly detecting your Go files as PHP.
First, check the file extension, make sure your Go files are saved with the .go extension.
If that’s not it, fix the language mode:
Open the Go file
Check the bottom-right of the editor, it should say “Go”
If it says “PHP,” click it and select “Go” from the language list
Also check file associations in Settings → Text Editor → Files → Associations and ensure *.go is mapped to the go language.
If it keeps happening, the file content may be confusing auto-detection. The detector looks at content patterns, so PHP-like syntax or top-of-file comments in your Go files can trigger it.
Let me know if the language mode shows “Go” but you still get PHP validation errors.
Also, please try updating to the latest version of Cursor.
Hello @deanrie , Thanks for the response.. My files are already marked as Go.The settings are all fine.
Still cursor is trying to validate my Go files as PHP. There is NO anything that indicates that the file is or looks like a PHP code (this is impossible in Go).