src/language/CodeInspection.js
function toggleEnabled(enabled, doNotSave) {
        if (enabled === undefined) {
            enabled = !_enabled;
        }

        // Take no action when there is no change.
        if (enabled === _enabled) {
            return;
        }

        _enabled = enabled;

        CommandManager.get(Commands.VIEW_TOGGLE_INSPECTION).setChecked(_enabled);
        updateListeners();
        if (!doNotSave) {
            prefs.set(PREF_ENABLED, _enabled);
            prefs.save();
        }

        // run immediately
        run();
    }
function toggleEnabled(enabled, doNotSave) {
        if (enabled === undefined) {
            enabled = !_enabled;
        }

        // Take no action when there is no change.
        if (enabled === _enabled) {
            return;
        }

        _enabled = enabled;

        CommandManager.get(Commands.VIEW_TOGGLE_INSPECTION).setChecked(_enabled);
        updateListeners();
        if (!doNotSave) {
            prefs.set(PREF_ENABLED, _enabled);
            prefs.save();
        }

        // run immediately
        run();
    }
function toggleEnabled ( enabled , doNotSave ) { if ( enabled === undefined ) { enabled = ! _enabled ; } // Take no action when there is no change. if ( enabled === _enabled ) { return ; } _enabled = enabled ; CommandManager . get ( Commands . VIEW_TOGGLE_INSPECTION ) . setChecked ( _enabled ) ; updateListeners ( ) ; if ( ! doNotSave ) { prefs . set ( PREF_ENABLED , _enabled ) ; prefs . save ( ) ; } // run immediately run ( ) ; }
Enable or disable all inspection.
@param {?boolean} enabled Enabled state. If omitted, the state is toggled.
@param {?boolean} doNotSave true if the preference should not be saved to user settings. This is generally for events triggered by project-level settings.
Enable or disable all inspection .