Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<wx/wxprec.h>'
Priority: -1
SortPriority: 0
- Regex: '^".*"'
Priority: 1
SortPriority: 0
- Regex: '^<.*>'
Priority: 2
SortPriority: 0
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
Expand Down
5 changes: 1 addition & 4 deletions Outline/outline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
//--------------------------------------------

// Define the plugin entry point
CL_PLUGIN_API IPlugin* CreatePlugin(IManager* manager)
{
return new SymbolViewPlugin(manager);
}
CL_PLUGIN_API IPlugin* CreatePlugin(IManager* manager) { return new SymbolViewPlugin(manager); }

CL_PLUGIN_API PluginInfo* GetPluginInfo()
{
Expand Down
2 changes: 0 additions & 2 deletions PCH/dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////


100 changes: 50 additions & 50 deletions PCH/precompiled_header_dbg.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2008 by Eran Ifrah
// file name : precompiled_header.h
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2008 by Eran Ifrah
// file name : precompiled_header.h
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifndef CODELITE_PRECOMPILED_HEADER_DEBUG_H
#define CODELITE_PRECOMPILED_HEADER_DEBUG_H

#ifdef __cplusplus
#ifdef __cplusplus

// Only include the headers we need here
#include "../CodeLite/MSWPrivate.h"
Expand Down Expand Up @@ -84,7 +84,7 @@
#include <wx/wupdlock.h>
#include <wx/wx.h>
#include <wx/xrc/xmlres.h>
#endif // #if wxUSE_GUI
#endif // #if wxUSE_GUI

/////////////////////////////////////////////////////////////////////////////
// Unicode:
Expand All @@ -96,36 +96,36 @@
/////////////////////////////////////////////////////////////////////////////

#if defined(__APPLE__) || defined(__CYGWIN__)
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#endif

#ifdef wxUSE_UNICODE
#ifndef _U
#define _U(x) wxString((x),wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x,y) wxString((x),y)
#endif
#ifndef _CC
#define _CC(x,y) (x).mb_str((y))
#endif
#ifndef _U
#define _U(x) wxString((x), wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x, y) wxString((x), y)
#endif
#ifndef _CC
#define _CC(x, y) (x).mb_str((y))
#endif
#else
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x,y) (x)
#endif
#ifndef _CC
#define _CC(x,y) (x)
#endif
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x, y) (x)
#endif
#ifndef _CC
#define _CC(x, y) (x)
#endif
#endif

#ifndef _C
#define _C(x) _CC((x),wxConvUTF8)
#define _C(x) _CC((x), wxConvUTF8)
#endif

#endif // __cplusplus
#endif // CODELITE_PRECOMPILED_HEADER_DEBUG_H
53 changes: 26 additions & 27 deletions PCH/precompiled_header_release.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifndef CODELITE_PRECOMPILED_HEADER_RELEASE_H
#define CODELITE_PRECOMPILED_HEADER_RELEASE_H

#ifndef CODELITE_PRECOMPILED_HEADER_RELEASE_H
#define CODELITE_PRECOMPILED_HEADER_RELEASE_H

#ifdef __cplusplus

Expand Down Expand Up @@ -96,37 +95,37 @@
// 3. To convert literal strings, use _T()
/////////////////////////////////////////////////////////////////////////////

#if defined(__APPLE__) || defined(__CYGWIN__)
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#if defined(__APPLE__) || defined(__CYGWIN__)
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#endif

#ifdef wxUSE_UNICODE
#ifndef _U
#define _U(x) wxString((x),wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x,y) wxString((x),y)
#endif
#ifndef _CC
#define _CC(x,y) (x).mb_str((y))
#endif
#ifndef _U
#define _U(x) wxString((x), wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x, y) wxString((x), y)
#endif
#ifndef _CC
#define _CC(x, y) (x).mb_str((y))
#endif
#else
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x,y) (x)
#endif
#ifndef _CC
#define _CC(x,y) (x)
#endif
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x, y) (x)
#endif
#ifndef _CC
#define _CC(x, y) (x)
#endif
#endif

#ifndef _C
#define _C(x) _CC((x),wxConvUTF8)
#define _C(x) _CC((x), wxConvUTF8)
#endif

#endif // __cplusplus
#endif // CODELITE_PRECOMPILED_HEADER_RELEASE_H
#endif // CODELITE_PRECOMPILED_HEADER_RELEASE_H
53 changes: 26 additions & 27 deletions PCH/precompiled_header_release_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifndef CODELITE_PRECOMPILED_HEADER_RELEASE_H
#define CODELITE_PRECOMPILED_HEADER_RELEASE_H

#ifndef CODELITE_PRECOMPILED_HEADER_RELEASE_H
#define CODELITE_PRECOMPILED_HEADER_RELEASE_H

#ifdef __cplusplus

Expand Down Expand Up @@ -96,37 +95,37 @@
// 3. To convert literal strings, use _T()
/////////////////////////////////////////////////////////////////////////////

#if defined(__APPLE__) || defined(__CYGWIN__)
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#if defined(__APPLE__) || defined(__CYGWIN__)
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#endif

#ifdef wxUSE_UNICODE
#ifndef _U
#define _U(x) wxString((x),wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x,y) wxString((x),y)
#endif
#ifndef _CC
#define _CC(x,y) (x).mb_str((y))
#endif
#ifndef _U
#define _U(x) wxString((x), wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x, y) wxString((x), y)
#endif
#ifndef _CC
#define _CC(x, y) (x).mb_str((y))
#endif
#else
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x,y) (x)
#endif
#ifndef _CC
#define _CC(x,y) (x)
#endif
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x, y) (x)
#endif
#ifndef _CC
#define _CC(x, y) (x)
#endif
#endif

#ifndef _C
#define _C(x) _CC((x),wxConvUTF8)
#define _C(x) _CC((x), wxConvUTF8)
#endif

#endif // __cplusplus
#endif // CODELITE_PRECOMPILED_HEADER_RELEASE_H
#endif // CODELITE_PRECOMPILED_HEADER_RELEASE_H
19 changes: 11 additions & 8 deletions PHPLint/lintoptions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "cl_standard_paths.h"
#include "lintoptions.h"

#include "cl_standard_paths.h"
#include "fileutils.h"
#ifndef __WXMSW__
#include "globals.h"
Expand All @@ -16,17 +17,19 @@ LintOptions::LintOptions()
{
wxFileName newConfigFile = clStandardPaths::Get().GetUserDataDir() + wxFileName::GetPathSeparator() + "config" +
wxFileName::GetPathSeparator() + "phplint.conf";
if(!newConfigFile.FileExists()) {
if (!newConfigFile.FileExists()) {
wxFileName oldConfigFile = clStandardPaths::Get().GetUserDataDir() + wxFileName::GetPathSeparator() + "config" +
wxFileName::GetPathSeparator() + "php.conf";

// If the file does not exist, create a new one
wxString buf;
if(FileUtils::ReadBufferFromFile(newConfigFile, buf, 1) && (buf == "[")) {
if (FileUtils::ReadBufferFromFile(newConfigFile, buf, 1) && (buf == "[")) {
FileUtils::WriteFileContent(newConfigFile, "{}");
}

if (!newConfigFile.FileExists()) {
FileUtils::WriteFileContent(newConfigFile, "{}");
}

if(!newConfigFile.FileExists()) { FileUtils::WriteFileContent(newConfigFile, "{}"); }

// Save it
JSON newRoot(newConfigFile);
Expand All @@ -49,21 +52,21 @@ void LintOptions::FromJSON(const JSONItem& json)

#ifndef __WXMSW__
// Find an installed version of phpcs
if(m_phpcsPhar.IsEmpty()) {
if (m_phpcsPhar.IsEmpty()) {
wxFileName phpcsFile;
::FileUtils::FindExe("phpcs", phpcsFile);
SetPhpcsPhar(phpcsFile);
}

// Find an installed version of phpmd
if(m_phpmdPhar.IsEmpty()) {
if (m_phpmdPhar.IsEmpty()) {
wxFileName phpmdFile;
::FileUtils::FindExe("phpmd", phpmdFile);
SetPhpmdPhar(phpmdFile);
}

// Find an installed version of phpstan
if(m_phpstanPhar.IsEmpty()) {
if (m_phpstanPhar.IsEmpty()) {
wxFileName phpstanFile;
::FileUtils::FindExe("phpstan", phpstanFile);
SetPhpstanPhar(phpstanFile);
Expand Down
Loading
Loading