File: lintoptions.h

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (64 lines) | stat: -rw-r--r-- 1,804 bytes parent folder | download | duplicates (4)
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
58
59
60
61
62
63
64
#ifndef LINTOPTIONS_H
#define LINTOPTIONS_H

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

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

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

    virtual void FromJSON(const JSONItem& json);
    virtual JSONItem 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;
    }
    LintOptions& SetPhpstanPhar(const wxFileName& PhpstanPhar)
    {
        this->m_phpstanPhar = PhpstanPhar.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; }
    const wxString& GetPhpstanPhar() const { return m_phpstanPhar; }
};

#endif // LINTOPTIONS_H