private void MapClangTidyOptionsToSettings(ClangTidyOptions clangTidy)
        {
            TidySettingsModel tidySettingsModel = new TidySettingsModel();
              tidySettingsModel.HeaderFilter = clangTidy.HeaderFilter;
              tidySettingsModel.CustomChecks = clangTidy.TidyChecksCollection;
              tidySettingsModel.CustomExecutable = clangTidy.ClangTidyPath.Value;
              tidySettingsModel.FormatAfterTidy = clangTidy.FormatAfterTidy;
              tidySettingsModel.TidyOnSave = clangTidy.AutoTidyOnSave;

              settingsProvider.SetTidySettingsModel(tidySettingsModel);
        }
Esempio n. 2
0
        private void MapClangTidyOptionsToSettings(ClangTidyOptions clangTidy)
        {
            var tidySettingsModel = new TidySettingsModel
            {
                HeaderFilter     = clangTidy.HeaderFilter,
                CustomChecks     = clangTidy.TidyChecksCollection,
                CustomExecutable = clangTidy.ClangTidyPath.Value,
                FormatAfterTidy  = clangTidy.FormatAfterTidy,
                TidyOnSave       = clangTidy.AutoTidyOnSave
            };

            SettingsProvider.TidySettingsModel = tidySettingsModel;
        }
        private void MapOldSettings()
        {
            ClangOptions clangOptions = LoadOldSettingsFromFile(new ClangOptions(), GeneralConfigurationFileName);
              MapClangOptionsToSettings(clangOptions);

              ClangFormatOptions clangFormatOptions = LoadOldSettingsFromFile(new ClangFormatOptions(), FormatConfigurationFileName);
              MapClangFormatOptionsToSettings(clangFormatOptions);

              ClangTidyOptions clangTidyOptions = LoadOldSettingsFromFile(new ClangTidyOptions(), TidyOptionsConfigurationFileName);
              MapClangTidyOptionsToSettings(clangTidyOptions);

              ClangTidyPredefinedChecksOptions clangTidyPredefinedChecksOptions = LoadOldSettingsFromFile(new ClangTidyPredefinedChecksOptions(), TidyPredefinedChecksConfigurationFileName);
              MapTidyPredefinedChecksToTidyettings(clangTidyPredefinedChecksOptions);
        }