File: lintoptions.h

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (57 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef LINTOPTIONS_H
#define LINTOPTIONS_H

#include "cl_config.h" // Base class: clConfigItem

class LintOptions : public clConfigItem
{
    bool m_lintOnFileLoad;
    bool m_lintOnFileSave;
    wxString m_phpcsPhar;
    wxString m_phpmdPhar;
    wxString m_phpmdRules;

public:
    LintOptions();
    virtual ~LintOptions();

    virtual void FromJSON(const JSONElement& json);
    virtual JSONElement ToJSON() const;

    LintOptions& Load();
    LintOptions& Save();

    LintOptions& SetLintOnFileLoad(bool lintOnFileLoad)
    {
        this->m_lintOnFileLoad = lintOnFileLoad;
        return *this;
    }
    LintOptions& SetLintOnFileSave(bool lintOnFileSave)
    {
        this->m_lintOnFileSave = lintOnFileSave;
        return *this;
    }
    LintOptions& SetPhpcsPhar(const wxFileName& PhpcsPhar)
    {
        this->m_phpcsPhar = PhpcsPhar.GetFullPath();
        return *this;
    }
    LintOptions& SetPhpmdPhar(const wxFileName& PhpmdPhar)
    {
        this->m_phpmdPhar = PhpmdPhar.GetFullPath();
        return *this;
    }
    LintOptions& SetPhpmdRules(const wxFileName& PhpmdRules)
    {
        this->m_phpmdRules = PhpmdRules.GetFullPath();
        return *this;
    }

    bool IsLintOnFileLoad() const { return m_lintOnFileLoad; }
    bool IsLintOnFileSave() const { return m_lintOnFileSave; }
    const wxString& GetPhpcsPhar() const { return m_phpcsPhar; }
    const wxString& GetPhpmdPhar() const { return m_phpmdPhar; }
    const wxString& GetPhpmdRules() const { return m_phpmdRules; }
};

#endif // LINTOPTIONS_H