Question: Is there a way to disable inspection for one file opened in the editor? I occasionally open large library file in the editor to inspect its source code, and don't want IDEA to run inspections on this particular file.

Answer: 
Use Hector the Inspector guy. You can access it by clicking on "guy in a hat" icon in Status Bar or via `Code | Configure Current File Analysis...` from the main menu.

Once there you can move the "Highlighting Level" slider from "Inspections" to "Syntax" .. or even "None" in case of a large or complex file.

[![enter image description here](https://i.stack.imgur.com/MHBcW.png)](https://i.stack.imgur.com/MHBcW.png)

Notes:

1. Settings here affect current file only (excludes "Power Save Mode" option)
2. Depending on a file, you may have multiple sliders (e.g. in `.php` file you will see separate sliders for HTML and PHP languages: this may change depending on some other settings):

[![enter image description here](https://i.stack.imgur.com/xbkuJ.png)](https://i.stack.imgur.com/xbkuJ.png)

**P.S.**
If your file is actually part of the library (PHP or JavaScript; "Library" in terms of IDE, of course) then they by default should not have inspections enabled in them:

[![enter image description here](https://i.stack.imgur.com/7kQ4H.png)](https://i.stack.imgur.com/7kQ4H.png)

---

**UPDATE 2021-06-11:**

Hector the Inspector has been removed from the status bar since 2020.2 version or so. You can get it back by installing [Hector the Inspector plugin](https://plugins.jetbrains.com/plugin/15111-hector-the-inspector) from `Settings/Preferences | Plugins`
You can set scope for your project and run inspections only for selected scopes.

[![enter image description here](https://i.stack.imgur.com/XAlQi.png)](https://i.stack.imgur.com/XAlQi.png)

@see [Inspection severity and scopes](https://www.jetbrains.com/help/phpstorm/2016.1/inspections.html)