AtomLinter / linter-phpmd

Atom linter plugin for php, using phpmd.
21 stars 4 forks source link

Does not run on dragged and dropped file #39

Closed rugk closed 8 years ago

rugk commented 8 years ago

STR:

  1. Open a project or a directory.
  2. Create a new php file somewhere and drag & drop it into Atom.
  3. Save it.

AFAIK the new file does not get linted.

Arcanemagus commented 8 years ago

This sounds like an Atom or linter bug, investigating.

Arcanemagus commented 8 years ago

Steps I followed:

  1. Remove all project folders from Atom (so when reopening it nothing would open
  2. Close and Open Atom (to a blank window)
  3. Drag a file with known PHPMD rule violations into the window (it opens and displays no errors)
  4. Save the file

I get PHPMD errors to show up on save, what version of Atom, linter, and linter-phpmd do you have installed? Do you get errors on the file if you open it normally?

Arcanemagus commented 8 years ago

Just tried with a completely blank profile (installed linter-phpmd and dragged the file in) with the same result.

I'll try this on v1.3.2, maybe it is an Atom bug that has been fixed in v1.4.0-beta3.

Arcanemagus commented 8 years ago

Have you restarted Atom since installing linter-phpmd/linter? The only time I was able to reproduce this is on a fresh profile if I attempted to drop the file in and save before restarting after installing them. Since linter hasn't been able to register it's hooks it doesn't run.

rugk commented 8 years ago

I get PHPMD errors to show up on save

Well... this is also bad. :laughing:

what version of Atom, linter, and linter-phpmd do you have installed?

Windows 7, x64 Atom 1.3.2 Linter 1.11.3 linter-phpmd 1.3.2

Do you get errors on the file if you open it normally?

No. BTW I do not get any errors at all. It just does not do something. At least it did not got to my breakpoint.

FYI I cannot reproduce it now either.

BTW the only issue related to this I know is: https://github.com/atom/tree-view/issues/471

rugk commented 8 years ago

Have you restarted Atom since installing linter-phpmd/linter?

Yes, I installed both already days or weeks before.

Arcanemagus commented 8 years ago

What happens if you follow these steps:

  1. Close all instances of Atom
  2. Rename the .atom folder in your home directory to something else (.atom.orig)
  3. Launch Atom and install linter-phpmd (It should install linter for you automatically, for me it is reporting a failure while installing it, but it still installs it properly so I'm not sure what is going on there yet.)
  4. If necessary configure the path to phpmd, from your other issue it seems something is odd with your system's setup here as you should be able to just run phpmd from any command prompt...
  5. Close Atom
  6. Open Atom again
  7. Drag the file onto the window
  8. Save the file

After testing that delete the .atom folder and rename .atom.orig to .atom. (Windows will see this and name it the proper .atom for you, otherwise it is impossible to name a folder in that manner in the GUI).

(I see that treeview bug as well, but it doesn't seem relevant to this since things are working for me)

Arcanemagus commented 8 years ago

Closing due to a lack of response and inability to reproduce, if you are still experiencing this please comment back with the results of the last comment's testing steps :wink:.