Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    PHP linter config with -l in Notepad++

    General Discussion
    3
    6
    396
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Scott Moore
      Scott Moore last edited by

      Did I miss something?
      For 2 years now, when writing code and after saving the php scripts with that code, I dig for particular folder full of a growing number of .bat file scripts each containing a windows command that runs php linter against the aforementioned PHP scripts to find PHP syntax errors --one script at a time -one syntax error at a time. The scripts take only a minute or two but after years it starts to annoy. Yes I searched and tried many suggestions but no dice. If I missed something plain to see just tell me. Funny thing is I had it working years ago. Can’t recall what I did.

      I tried configuring php linter using the plugin NppExec. No dice. The -l option prints a syntax error message the moment you type it, right? If you have it config’ed and working a screenshot with the precise config syntax would help.

      PeterJones Scott Moore 2 Replies Last reply Reply Quote 0
      • PeterJones
        PeterJones @Scott Moore last edited by

        @scott-moore ,

        The -l option in Notepad++ just tells Notepad++ what language to use for syntax highlighting.

        NppExec can easily run an external linter on your active file. If you show your NppExec script, someone here can probably explain why it’s not doing what you want.

        1 Reply Last reply Reply Quote 0
        • Scott Moore
          Scott Moore @Scott Moore last edited by

          @scott-moore Thanks.

          1 Reply Last reply Reply Quote 0
          • Scott Moore
            Scott Moore last edited by

            Least Easy:
            A CMD script per php file DOS windows etc etc -see above post

            Easier:
            Now It is easier for me to lint (syntax check PHP using nppexec. Hit F6, smack a couple arrows keys then slam down the the Enter key and the error displays at the bottom of notepad++ Thx Peter. You didn’t have much detail but you implied it easy. IT was.

            EASIEST:
            I had php linter installed and configured in notepad++ years ago such that the instant you inserted a typo, php flashed the syntax error in the console at the bottom without having to save the file or punch a single button. Anybody know how I got that working.??

            ;)

            If not, how can I assign a single button to lint a php sciript? A trivial issue? After repeating a trivial task a million times it might annoy you.

            Alan Kilborn 1 Reply Last reply Reply Quote 0
            • Alan Kilborn
              Alan Kilborn @Scott Moore last edited by

              @scott-moore said in PHP linter config with -l in Notepad++:

              I had php linter installed and configured in notepad++ years ago such that the instant you inserted a typo, php flashed the syntax error in the console at the bottom without having to save the file or punch a single button.

              THAT seems ambitious. I’d think that unless something was super-highly integrated, that it would be taking a brute force method of linting the entire file on every keystroke/cut/paste/delete.

              I just have my Python syntax checker running on every save; no extra keystroke involved because saving often is good (and so is syntax checking). :-)

              Mine runs via a PythonScript using that plugin. You could consider that to invoke what you need, or if you’re not a big fan of Python, maybe the NppExec plugin meets your need better.

              Scott Moore 1 Reply Last reply Reply Quote 1
              • Scott Moore
                Scott Moore @Alan Kilborn last edited by

                @alan-kilborn Good advice. It’s good enough the way it is

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors