Compare commits

...
353 Commits
Author SHA1 Message Date
Sean McManus 317df57496 Merge pull request #12658 from microsoft/main
Merge for 1.22.2
2024-08-29 19:31:09 -07:00
Sean McManus 86b698b503 Update changelog and version for 1.22.2. (#12657) 2024-08-29 19:04:49 -07:00
browntarik b7f76c507c Remove intellisenseEngineFallback description (#12655)
* Remove intellisenseEngineFallback description.
* Remove references to includeFallback.
2024-08-29 18:46:25 -07:00
browntarik fcdccd4dff Remove usage of intellisenseEngineFallback setting. (#12600) 2024-08-29 13:54:15 -07:00
Sean McManus f63c3652f8 Merge pull request #12654 from microsoft/main
Merge for 1.22.1
2024-08-29 13:36:59 -07:00
Sean McManus f222a97849 Update changelog for 1.22.1 (#12646)
* Update changelog for 1.22.1
2024-08-29 13:32:47 -07:00
Bob Brown 1f426edd13 Address a component governance report on webpack (#12649) 2024-08-28 10:53:10 -07:00
Bob Brown 994e7b9201 Log the values of editor settings that we track (#12635) 2024-08-27 17:04:01 -07:00
Sean McManus 5d62607760 Merge pull request #12633 from microsoft/main
Merge for 1.22.0 (2nd time)
2024-08-26 15:23:50 -07:00
Sean McManus 3dc7067c30 Update changelog (2nd time) (#12631) 2024-08-26 13:39:38 -07:00
Stanislav 49d987d747 Fix show a list local processes, if remote connection failed (useExtendedRemote) (#12623)
* Fix show a list local processes, if remote connection failed (useExtendedRemote)
2024-08-26 12:22:24 -07:00
dependabot[bot] c81120e7c4 Bump micromatch from 4.0.7 to 4.0.8 in /Extension (#12630)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 12:14:52 -07:00
Bob Brown e5ce40bfe1 Log the modified extension settings as part of Log Diagnostics (#12621) 2024-08-26 12:02:03 -07:00
Sean McManus d3cd4fcfd7 Fix vcFormat not working and other case comparison bugs. (#12620) 2024-08-23 11:15:42 -07:00
Colen Garoutte-Carson d8a6a98f4b Switch from LSP hover to HoverProvider (#12612) 2024-08-22 19:26:37 -07:00
Colen Garoutte-Carson 326f7d93b9 Spread out schedules of github actions to avoid 'rate limit' errors (#12616) 2024-08-22 18:10:15 -07:00
Colen Garoutte-Carson fbfddd2158 Prevent AddComment action from adding redundant comments (#12611) 2024-08-21 14:32:58 -07:00
Sean McManus 26d0932972 Merge pull request #12610 from microsoft/main
Merge for 1.22.0 (pre-release)
2024-08-21 14:05:26 -07:00
Sean McManus d7bfae6ed1 Update changelog/version for 1.22.0 (#12602)
* Update changelog and version for 1.22.0.
2024-08-21 13:24:07 -07:00
Sean McManus 66b934c6df Update TPN for 1.22.0. (#12601) 2024-08-21 11:44:04 -07:00
Colen Garoutte-Carson 7dcd5a48c0 Remove use of editorconfig module to avoid dependency on one-ini wasm file. (#12579) 2024-08-20 14:38:19 -07:00
Colen Garoutte-Carson a0f863c560 Fix LSP cancellation (#12592) 2024-08-20 14:25:37 -07:00
Garrett SerackandColen Garoutte-Carson 818f7c6899 Update scripts use of spawnSync to work with newer versions of nodejs (#12503)
Co-authored-by: Colen Garoutte-Carson <[email protected]>
2024-08-20 14:10:48 -07:00
Colen Garoutte-Carson cb50bb1b34 Fix addComment action (#12599) 2024-08-20 14:05:45 -07:00
Colen Garoutte-Carson 632454923c Add AddComment GitHub action, and workflows for tagging new debugger issues (#12496) 2024-08-20 13:25:14 -07:00
Bob Brown 06ed83878c Release pipelines for themes and extension pack (#12589) 2024-08-19 16:38:58 -07:00
Sean McManus 4a7fe28adc Update msvc versions for 17.11 (#12583)
* Update msvc versions for 17.11
2024-08-18 06:40:30 -07:00
Sean McManus 0ffdc003fa Fix "Replacement of a substring with itself" warning. (#12546) 2024-08-15 19:18:41 -07:00
browntarik d2bd3e035c Refactor compilerPath logic to reflect settings validation changes (#12556)
* Remove unnesseacary null check and set compilerPathIsExplicit when defaultCompilerPath is null

* Remove unneccessary else statement.

* Refactor changes

* Propogate null usage to reflect null typing for compilerPath.

* Remove normalization of null to undefined.

* Fix linting

* Add null to resolvedCompilerPath

* Update cpp_properties schema
2024-08-15 12:29:06 -07:00
Colen Garoutte-Carson d4c46c725d Update OneLocBuild pipeline (#12573) 2024-08-15 11:59:28 -07:00
Sean McManus 631c522737 Remove debug and ms from TPN (not actually distributed). (#12566) 2024-08-14 18:23:31 -07:00
Sean McManus 571f2d57ef Update axios to 1.7.4. (#12564) 2024-08-13 14:04:56 -07:00
Sean McManus 5cec9b93b8 Fix 5 high severity vulnerabilities in .github/actions. (#12562) 2024-08-13 12:17:20 -07:00
Sean McManus da2fcbc88c Fix vsce with cg.yml (#12561)
* Fix vsce via upgrading to node.js 18.
2024-08-12 14:20:27 -07:00
browntarik 3cf9a99864 Add Validation for VS Code Settings (#12454) 2024-08-09 12:18:44 -07:00
Sean McManus 99af8d886e Update changelog and version for 1.21.6 (#12539) 2024-08-05 10:38:27 -07:00
Sean McManus b768a5440a Update for 1.21.5. (#12530) 2024-07-30 22:09:47 -07:00
Sean McManus 570862bf64 Update TPN for 1.21.4 (#12518) 2024-07-25 15:17:27 -07:00
Sean McManus 4e09135edc Go back to supporting VS Code 1.67.0 instead of 1.82.0. (#12515) 2024-07-25 14:37:18 -07:00
Sean McManus 15c6bdd613 Update changelog and version for 1.21.3. (#12499) 2024-07-23 19:30:20 -07:00
Bob Brown 7078f4b0bd Enable codeQL for TypeScript (#12490) 2024-07-19 11:30:20 -07:00
Sean McManus 626bb6e388 Change cpp editor.stickyScroll.defaultModel. (#12486) 2024-07-18 18:05:31 -07:00
Sean McManus 01829f8b81 Update 1.21.2 changelog in main. (#12485)
* Update 1.21.2 changelog in main.
* Update version
2024-07-18 21:46:31 +00:00
Colen Garoutte-Carson 9f2e50b2ef Update edge strings for FI (#12487) 2024-07-17 18:25:57 -07:00
Sean McManus 825033f768 Merge pull request #12467 from microsoft/main
Merge for 1.21.1 (pre-release)
2024-07-12 11:50:25 -07:00
Bob Brown 6fc05290e6 Strip quotes from debug configurations and fix an issue with quotes in paths (#12471) 2024-07-12 11:46:08 -07:00
Ben McMorran c976dba2dd Don't show warning notification when C_Cpp.getIncludes is disabled (#12470) 2024-07-12 10:53:28 -07:00
Sean McManus d5077a2575 Update changelog and version for 1.21.1. (#12449)
* Update changelog and version for 1.21.1.
2024-07-11 18:50:25 -07:00
[email protected] 3d01238ef9 [Auto] Localization - Translated Strings (#12279) 2024-07-11 17:56:25 -07:00
Sean McManus 0f7faae67f Fix multiple cpptools processes running with a multiroot workspace. (#12461) 2024-07-11 15:14:02 -07:00
Sean McManus 36dd0b874b Check extensions.ignoreRecommendations before doing insiders prompting. (#12447) 2024-07-09 17:27:30 -07:00
Colen Garoutte-Carson 14bd2e7f8e Update VCPkgHeadersDatabase.zip (#12430) 2024-07-02 18:32:09 -07:00
Colen Garoutte-Carson 9d321ce412 Fix an issue with missing custom configurations (#12427) 2024-07-01 14:34:21 -07:00
Colen Garoutte-Carson 7a1785d783 Update edge strings for FI (#12395) 2024-06-28 10:58:16 -07:00
browntarik b5057a1d02 Strip '\r' and '\n' from the end of each line if they exist when parsing the vcpkg database (#12416)
* Strip '\r' and '\n' from the end of each line if they exist when parsing the vcpkg database.

* remove debugging log

* Fix lint issue

* Revert regex

* Refactor line trimming

* Fix lint issues

* Remove old comment
2024-06-26 17:18:00 -07:00
browntarik 2d22b1493c Add @see and @sa Doxygen Tags with the "See Also:" label. (#12415)
* Add sa and see doxygen tags with the "See Also" label.

* remove redundant label

* Fix "See also" label
2024-06-26 15:08:02 -07:00
Sean McManus 3933174c29 Fix the tag parser busy indicator while initializing. (#12404) 2024-06-24 10:19:58 -07:00
Sean McManus d8426caacc Merge pull request #12389 from microsoft/main
Fix crash from loc message mismatch. (#12388)
2024-06-17 14:36:02 -07:00
Sean McManus 0061da69af Fix crash from loc message mismatch. (#12388) 2024-06-17 14:29:25 -07:00
Sean McManus 8942530744 Merge pull request #12386 from microsoft/main
Update changelog date. (#12385)
2024-06-17 11:03:29 -07:00
Sean McManus fced3fbd17 Update changelog date. (#12385) 2024-06-17 11:00:01 -07:00
Sean McManus e663939e56 Merge pull request #12374 from microsoft/seanmcm/1_21_0_insiders
Merge for 1.21.0
2024-06-13 19:22:14 -07:00
Sean McManus 1fb5b63ab7 Merge branch 'main' into seanmcm/1_21_0_insiders 2024-06-13 14:47:55 -07:00
Sean McManus 15c96e28da Updates for 1.21.0 (#12370)
* Updates for 1.21.0
2024-06-13 14:43:27 -07:00
Bob Brown 2327499cdb one-ini-bg.wasm is missing from the webpacked extension (#12369) 2024-06-13 12:10:48 -07:00
Bob Brown 9061b79f2b Update to the latest telemetry API (#12367) 2024-06-12 16:43:27 -07:00
Sean McManus cf35bbcd0e Revert back to glob 7 due to test failures (and update .github/actions dependencies) (#12365)
* Revert back to glob 7 due to test failures.
* Fix npm audit issues with .github/actions
2024-06-12 10:20:04 -07:00
Bob Brown a096f06683 Update top level documents for compliance (#12343) 2024-06-11 09:12:51 -07:00
Sean McManus 1cfd34ca23 Update dependencies, glob, and IntelliSense loc strings (#12317)
* Update dependencies
* Update TPN.
* Update glob.
* Update EDG loc strings.
2024-06-07 17:41:19 -07:00
Luca 923ecfa1cd make debugging easier to inspect local var value (#12358) 2024-06-07 15:28:22 -07:00
Sean McManus db61a690be Fixes/improvements to crash call stacks. (#12355)
* Fixes/improvements to crash call stacks.
2024-06-06 14:57:57 -07:00
Sean McManus 9a5f24fafb Update dependencies. (#12351) 2024-06-05 18:51:29 -07:00
[email protected] cf2ea08800 [Auto] Localization - Translated Strings (#12236) 2024-05-03 15:33:13 -07:00
Sean McManus 3182eed2ac Update version and changelog for 1.20.5 (#12264)
* Update version and changelog for 1.20.5
2024-05-03 14:44:48 -07:00
Sean McManus 054e826e2c Fix macOS version check. (#12276) 2024-05-03 13:13:46 -07:00
Sean McManus fd482d2169 Merge pull request #12274 from microsoft/seanmcm/1_20_4_cherrypick
Updates for 1.20.4 (#12273)
2024-05-02 11:16:42 -07:00
Sean McManus 2fafd831e5 Updates for 1.20.4 (#12273)
* Don't use the crash handler on macOS < 19.
* Update version and changelog.
2024-05-02 10:14:49 -07:00
Sean McManus b3af47fd03 Updates for 1.20.4 (#12273)
* Don't use the crash handler on macOS < 19.
* Update version and changelog.
2024-05-02 10:12:01 -07:00
Bob Brown fbea8eb211 Update CHANGELOG.md (#12271) 2024-05-01 14:16:34 -07:00
Sean McManus 1ceae9d4ed Merge pull request #12266 from microsoft/seanmcm/1_20_3_cherryPicks
Cherry-picks for 1.20.3
2024-04-30 16:18:52 -07:00
Sean McManus d4d5d4551f Update version and changelog for 1.20.3 (#12245)
* Update version and changelog for 1.20.3
2024-04-30 13:11:53 -07:00
Sean McManus 0ef77b5616 Improvements to crash call stack logging. (#12247)
* Updates to crash call stack logging.
* Move crash logging to its own channel.
2024-04-30 13:11:10 -07:00
Sean McManus 79c4412287 Update version and changelog for 1.20.3 (#12245)
* Update version and changelog for 1.20.3
2024-04-30 13:08:27 -07:00
Bob Brown 7c24091cc8 enable TSA and policheck (#12258) 2024-04-26 11:13:17 -07:00
Sean McManus efa93d8b59 Improvements to crash call stack logging. (#12247)
* Updates to crash call stack logging.
* Move crash logging to its own channel.
2024-04-25 16:38:21 -07:00
Sean McManus efdc8e90f6 Merge pull request #12235 from microsoft/seanmcm/1_20_2_cherryPicks2
Cherry-picks for 1.20.2
2024-04-19 17:17:01 -07:00
Sean McManus 9f020e9258 Update changelog for 1.20.2 (2nd time) (#12228)
* Update changelog
2024-04-19 16:57:13 -07:00
Bob Brown c058568767 rename the property again (#12233)
* rename the property again

* fail
2024-04-19 16:57:00 -07:00
browntarik 8809e69e91 Remove redundant variable resolution in handleSquiggles and fix error messaging for env and delimited paths under include paths in c_cpp_properties.json (#12188)
* remove redundant variable resolution

* fix lint

* remove resolveVariable redundancies

* change when resolve and split happens

* fix lint

* Resolve error checking for environment vars and delimited paths

* remove "path" from error messaging

* Adjust error messaging

* remove stray comment

* refactor error messaging + minor fix

* resolve lint

* Fix multi path squiggle regression

* Remove resolvedPath redundancies

* Refactor error messaging and squiggling

* Revert and improve error squiggling behavior

* fix linting

* properly proccess glob patterns + minor fixes

* fix comment positions

* Refactor error message + minor fix

* Fix telemetry metric + minor fix
2024-04-19 16:56:46 -07:00
Sean McManus 7af5c40dd0 Handle multiple cpptools-srv crashes. (#12225) 2024-04-19 16:56:33 -07:00
Sean McManus a1baeac6f7 Update changelog for 1.20.2 (2nd time) (#12228)
* Update changelog
2024-04-19 16:54:05 -07:00
Bob Brown 3b68eab6ca rename the property again (#12233)
* rename the property again

* fail
2024-04-19 14:55:19 -07:00
browntarik 997a042ebf Remove redundant variable resolution in handleSquiggles and fix error messaging for env and delimited paths under include paths in c_cpp_properties.json (#12188)
* remove redundant variable resolution

* fix lint

* remove resolveVariable redundancies

* change when resolve and split happens

* fix lint

* Resolve error checking for environment vars and delimited paths

* remove "path" from error messaging

* Adjust error messaging

* remove stray comment

* refactor error messaging + minor fix

* resolve lint

* Fix multi path squiggle regression

* Remove resolvedPath redundancies

* Refactor error messaging and squiggling

* Revert and improve error squiggling behavior

* fix linting

* properly proccess glob patterns + minor fixes

* fix comment positions

* Refactor error message + minor fix

* Fix telemetry metric + minor fix
2024-04-19 14:11:41 -07:00
Colen Garoutte-Carson aacc06ed27 Fix issue with not yet localized edge strings (#12232) 2024-04-19 13:50:22 -07:00
[email protected] 1ae5303cf0 [Auto] Localization - Translated Strings (#11999) 2024-04-19 13:48:48 -07:00
Sean McManus 7baeb52329 Handle multiple cpptools-srv crashes. (#12225) 2024-04-18 18:28:00 -07:00
Colen Garoutte-Carson 0e5ee3a4d4 Update edge loc strings for FI (#12217) 2024-04-18 15:53:11 -07:00
Sean McManus 1d2bd10691 Merge pull request #12223 from microsoft/main
Fix SettingsTracking treating numerical loggingLevel as invalid. (#12…
2024-04-18 15:11:30 -07:00
Sean McManus 21ef2e36d6 Fix SettingsTracking treating numerical loggingLevel as invalid. (#12216)
* Fix SettingsTracking treating numerical loggingLevel as invalid.
* Fix numeric loggingLevels.
* Return -1 numerical value on invalid levels.
2024-04-18 12:44:22 -07:00
Sean McManus dac96fe852 Merge pull request #12209 from microsoft/main
Merge for 1.20.2
2024-04-16 18:43:48 -07:00
Sean McManus b955eeb013 Update version and changelog for 1.20.2 (#12208) 2024-04-16 17:31:16 -07:00
Sean McManus 3e6b99925b Crash handler update (#12190)
* Minor update to watchForCrashes.
* Add preinitialize message.
2024-04-16 15:36:28 -07:00
Bob Brown f06f689488 rename telemetry property (#12202) 2024-04-15 17:05:48 -07:00
Bob Brown fec0d8854e Log more info with the configuration provider telemetry (#12193) 2024-04-13 09:01:53 -07:00
Sean McManus a1487e5e79 Merge pull request #12185 from microsoft/main
Merge for 1.20.1
2024-04-09 17:07:29 -07:00
Bob Brown 4650cfeeb9 Update CHANGELOG.md (#12186) 2024-04-09 14:43:42 -07:00
Sean McManus 35cda7ebb0 Update changelog for 1.20.1 (#12182)
* Update changelog for 1.20.1
2024-04-09 13:09:25 -07:00
Sean McManus 92a0494796 Update for libexecinfo crash handler change. (#12158)
* Update for libexecinfo crash handler change.
* Update ThirdPartyNotices.txt
2024-04-08 16:13:36 -07:00
Bob Brown d2bd18acf1 don't strip underscores when demangling (#12159) 2024-04-01 14:04:46 -07:00
Bob Brown f3cbf1237d clean up the pipeline runs (#12151) 2024-03-27 17:32:41 -07:00
Bob Brown 76509d6a0c Component Governance pipeline for vscode-cpptools (#12148) 2024-03-27 14:07:28 -07:00
Sean McManus 6f19496172 Merge pull request #12138 from microsoft/main
Merge for 1.20.0
2024-03-26 14:12:18 -07:00
Sean McManus 32ead756bb Update changelog and version for 1.20.0. 2024-03-25 16:17:37 -07:00
Colen Garoutte-Carson 976a1ba8e8 Update to clang-tidy 18.1.2 (#12135) 2024-03-22 18:14:30 -07:00
Garrett Serack 1c4292d8f5 remove unnecessary null (#12133) 2024-03-22 11:22:26 -07:00
Garrett Serack 1ab766bc5c Add setting to support max search results (#12131) 2024-03-21 11:17:24 -07:00
Colen Garoutte-Carson 127588ba57 Update changelog for 1.19.9 again (#12122) 2024-03-19 16:15:31 -07:00
Colen Garoutte-Carson ccd80fedb1 Update changelog 1.19.9 (#12117) 2024-03-18 13:21:27 -07:00
dependabot[bot]andSean McManus 1fc8731c2b Bump follow-redirects from 1.15.5 to 1.15.6 in /Extension (#12112)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>
2024-03-18 12:31:43 -07:00
dependabot[bot]andSean McManus b6deaf9fa0 Bump follow-redirects from 1.15.4 to 1.15.6 in /.github/actions (#12111)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>
2024-03-18 12:24:09 -07:00
browntarik a6eff82854 Add internal formatting support for Copy Declaration/Definition (#12055)
* Add text formatting for CopyDD

* fix lint issues

* Plumb up editor settings msg

* add vcFormat param

* Add formatParams to CDD + rollback changes

* fix lint issue

* update defaults

* Reafctor formatParams correctly for vcFormat and .editor_config

* populate editorConfigSettings

* minor fix

* minor fix
2024-03-18 11:08:11 -07:00
Luca 751fd74113 Add a command to fetch the includes graph for a TU (#12085) 2024-03-14 16:54:37 -07:00
Colen Garoutte-Carson 3dfa607685 Revert "Address multiple-init scenario"
This reverts commit b2c06a57c9.
2024-03-14 12:55:19 -07:00
Colen Garoutte-Carson b2c06a57c9 Address multiple-init scenario 2024-03-14 12:54:14 -07:00
Colen Garoutte-Carson a97a334eb0 Update changelog for 1.19.8 again (#12099) 2024-03-13 17:11:41 -07:00
browntarik 3d8180141f Eliminate squiggle from all glob configurations (#12072)
* Fix glob coverage

* resolve and split paths before validation

* expand glob patterns and do not expand incorrect paths

* Do not squiggle paths that need to be expanded

* revert change

* squiggle paths that end with *

* Do not squiggle paths that end with *

* properly squiggle glob paths with recursive includes

* correctly report squiggles with glob paths

* move check for asterisk to outer check

* fix lint issues
2024-03-13 17:13:31 +00:00
Colen Garoutte-Carson 74ab0e7ba5 Update changelog for 1.19.8 (#12092) 2024-03-12 19:10:13 -07:00
Sean McManus 8dfeccd935 Fix Add Configuration with snippets disabled. (#12080) 2024-03-11 16:45:35 -07:00
Bob Brown c144fe2408 Prevent the status bar from updating too quickly (#12088) 2024-03-11 13:29:52 -07:00
Colen Garoutte-Carson 3bbc6716ad Update changelog again for 1.19.7 (#12086) 2024-03-08 15:00:40 -08:00
Colen Garoutte-Carson 75ed1b5ec3 Update changelog for 1.19.7 (#12081) 2024-03-08 10:29:55 -08:00
browntarik 699b3d52c5 Resolve userHome variable in c_cpp_properties.json (#12071)
* Add userHome envrionment variable

* Resolve userHome to os.homedir

* revert change

* fix lint issues

* Rework resolving variables + minor change

* Minor fixes
2024-03-07 10:59:30 -08:00
Colen Garoutte-Carson ae8c4aca58 Update edge json files for FI (#12074) 2024-03-06 19:47:10 -08:00
Colen Garoutte-Carson 79d0c06951 Update edge loc strings (#12073) 2024-03-06 18:58:33 -08:00
Colen Garoutte-Carson a877c6f1ae Fix forced include resolution (#12035) 2024-03-06 14:15:22 -08:00
Colen Garoutte-Carson 6ccc588d69 Merge branch 'release' into main 2024-03-05 17:13:14 -08:00
Colen Garoutte-Carson 81071ba4f5 Update changelog for 1.19.6 (#12064) 2024-03-05 17:12:32 -08:00
Sean McManus e12c7c28d1 Merge pull request #12054 from microsoft/main
Update changelog (again) (#12053)
2024-03-04 12:57:53 -08:00
Sean McManus 724b47922e Update changelog (again) (#12053) 2024-03-04 12:56:08 -08:00
Sean McManus b3911bf88a Merge pull request #12046 from microsoft/main
Update date (#12045)
2024-03-01 18:41:51 -08:00
Sean McManus 802f94560d Update date (#12045)
* Update date.
2024-03-01 13:50:12 -08:00
Sean McManus 5573667b95 Merge pull request #12038 from microsoft/main
Update changelog. (#12037)
2024-02-29 17:14:10 -08:00
Sean McManus dd5d161991 Update changelog. (#12037) 2024-02-29 17:12:48 -08:00
Colen Garoutte-Carson a005307a60 Merge pull request #12034 from microsoft/main 2024-02-28 13:38:45 -08:00
Colen Garoutte-Carson dcb4b8501d Merge branch 'release' into main 2024-02-28 12:53:08 -08:00
Colen Garoutte-Carson 1e65cbf65d Update changelog for 1.19.5 (#12033) 2024-02-28 12:52:03 -08:00
Sean McManus cdc9dd8584 Fix inlay hint tests. And reapply inlay hint settings if they're changed (#12014)
* Fix inlay hint tests. And reapply inlay hint settings if they're changed.
* Make updating work without scrolling.
2024-02-27 14:45:19 -08:00
Sean McManus 93f4337576 Fix error handling when HostName is not available (#12022)
* Fix error handling when the HostName isn't available.
2024-02-27 14:26:19 -08:00
Colen Garoutte-Carson 69338b814b Update cppbuild task behavior for args and command fields to match VS Code's shell task type (#12026) 2024-02-27 13:07:40 -08:00
dependabot[bot] af6287f1ca Bump es5-ext from 0.10.62 to 0.10.64 in /Extension (#12028)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 10:37:23 -08:00
Colen Garoutte-Carson 1868f99cad Merge pull request #11996 from microsoft/main 2024-02-21 12:32:11 -08:00
Colen Garoutte-Carson ef3472d8f5 Merge branch 'release' into main 2024-02-21 12:08:28 -08:00
Sean McManus 347a1fac67 Update changelog for 1.19.4 (#11976)
* Update changelog for 1.19.4
2024-02-21 19:47:55 +00:00
[email protected] 239d6a036b [Auto] Localization - Translated Strings (#11948) 2024-02-21 11:47:00 -08:00
dependabot[bot] d1da368537 Bump ip from 2.0.0 to 2.0.1 in /.github/actions (#11990)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-20 19:36:49 -08:00
browntarik 38c16a5888 Update shell quote E2E test (#11977)
* resolve e2e test
2024-02-20 16:04:46 -08:00
Trond Einar Snekvik 8b9960c603 Silence console.logs (#11973)
Removes the console.log messages that show up during normal execution.
Leaves console.logs in exception handlers the way they are.

Signed-off-by: Trond Einar Snekvik <[email protected]>
2024-02-16 18:05:33 -08:00
jogo- 0c937511c7 Fix typo in CHANGELOG.md (#11968) 2024-02-15 13:42:23 -08:00
browntarik 36ea516731 Fix E2E Shell Quoting Test (#11975)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue

* resolve e2e test

* add double quotes

* only escape baskslash

* resolve e2e test

* Add backslash
2024-02-15 11:40:42 -08:00
browntarik 54314feab5 Fix shell quoting e2e test (#11969)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue

* resolve e2e test

* add double quotes

* only escape baskslash
2024-02-14 15:27:10 -08:00
browntarik 286a5c590a Resolve prompt regression + fix e2e tests (#11964)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue
2024-02-13 15:01:59 -08:00
browntarik ce202f3549 resolve e2e test (#11961) 2024-02-13 12:08:42 -08:00
Colen Garoutte-Carson 76ccb791ff Merge pull request #11947 from microsoft/main 2024-02-09 17:16:17 -08:00
Colen Garoutte-Carson c7882e941c Update changelog for 1.19.3, to mention C_Cpp.experimentalFeatures (#11946) 2024-02-09 15:43:18 -08:00
[email protected] c5da16771a [Auto] Localization - Translated Strings (#11635) 2024-02-09 15:38:30 -08:00
browntarik 98c6222154 change ping interval to 14 days and close interval to 30 (#11943) 2024-02-09 09:17:53 -08:00
Colen Garoutte-Carson a5a5735089 Merge pull request #11942 from microsoft/main 2024-02-08 17:07:45 -08:00
Colen Garoutte-Carson 33dce288dd Update changelog and version for 1.19.3 (#11941) 2024-02-08 16:50:48 -08:00
Sean McManus 406f1d62df Update TPN. (#11940) 2024-02-08 15:48:18 -08:00
Garrett SerackandSean McManus 674148fb07 Perf-boost - fast query symbols (#11785)
* Perf-boost - fast query symbols

* Rebased, updated (moved to node 18.15.0+)

* quick cleanup

* remove unused linter directive

* Delete Extension/cpp.hint

That wasn't supposed to be here.

* restore file

---------

Co-authored-by: Sean McManus <[email protected]>
2024-02-08 14:37:29 -08:00
browntarik aa5601041c Remove whitespace if the includePath exists + minor fix (#11911)
* Remove whitespace if the includePath exists + minor fix

* fix lint issues

* Move includePath validation to config.ts

* fix lint issues

* small fixes

* fix lint issues
2024-02-05 16:15:01 -08:00
Colen Garoutte-Carson 62d167aeb3 Change default intelliSenseUpdateDelay to 1s (#11932) 2024-02-05 15:44:59 -08:00
browntarik b742a191ee Validate Compiler Paths Against PATH Environment Variable in Configuration UI (#11913)
* resolve compiler against envrionment variables

* fix lint issue
2024-02-01 13:36:09 -08:00
Sean McManus 9229952cd9 Update TPN for musl (#11912) 2024-01-31 18:01:57 -08:00
Sean McManus 389cfdd583 Improve crash logging (#11899)
* Improve crash logging.
2024-01-26 13:01:06 -08:00
Sean McManus 5077edf585 Merge pull request #11886 from microsoft/main
Merge for 1.19.2 (2nd time)
2024-01-19 18:08:55 -08:00
Sean McManus 3f1e851152 Log cpptools crash call stacks. (#11858)
* Log cpptools crash call stacks.
2024-01-19 17:51:01 -08:00
Colen Garoutte-Carson 6b1fe63294 Update changelog for 1.19.2 (#11885) 2024-01-19 15:30:00 -08:00
browntarik 821fbb3566 update changelog (#11878) 2024-01-19 15:03:15 -08:00
Sean McManus 3670564712 Fix broken edtior.wordBasedSuggestions setting. (#11773) 2024-01-18 10:29:43 -08:00
Colen Garoutte-Carson f38926f8b1 Merge pull request #11874 from microsoft/main 2024-01-16 17:41:23 -08:00
Sean McManus ced402ad5d Update ThirdPartyNotices.txt (#11873) 2024-01-16 17:29:06 -08:00
Colen Garoutte-Carson 5f8d072b86 Update CHANGELOG for 1.19.2 (#11871) 2024-01-16 17:22:55 -08:00
Sean McManus f84f285db3 Fix EACCES error when using include wildcards. (#11870) 2024-01-16 16:41:16 -08:00
Tobias Obermayer 44194c000d fix german translation for RunCodeAnalysis (#11845) 2024-01-16 15:49:38 -08:00
dependabot[bot]andSean McManus c61bd07bb5 Bump follow-redirects from 1.15.1 to 1.15.4 in /.github/actions (#11849)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.1 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.1...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>
2024-01-09 10:36:24 -08:00
dependabot[bot] 3df0a0f796 Bump follow-redirects from 1.15.3 to 1.15.4 in /Extension (#11850)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 10:30:20 -08:00
Colen Garoutte-Carson f16dfc92b2 Add permissions field to bot actions (#11847) 2024-01-08 16:40:51 -08:00
Bob Brown 96faf18d96 Address issues reported by compliance tooling (#11841) 2024-01-08 16:14:54 -08:00
browntarik 6393210a31 update shell quote baseline (#11827) 2024-01-03 10:48:29 -08:00
Sean McManus 7151847d1f Fix C_Cpp.autocomplete description. (#11816) 2023-12-29 14:33:57 -08:00
Sean McManus d5ffbd86f3 Fix extract to function formatting. (#11804)
* Fix extract to function formatting.
2023-12-27 15:04:04 -08:00
Sean McManus ab8b90b187 Stop clearing code analysis problems in updateCustomConfigurations. (#11798) 2023-12-21 17:35:51 -08:00
Sean McManus 8d42c49b77 Fix configuration provider handling with intelliSenseEngine "disabled". (#11797) 2023-12-21 12:27:41 -08:00
Colen Garoutte-Carson 0e24296f67 Enable progressive IntelliSense updates (#11735) 2023-12-19 18:24:05 -08:00
browntarik 7f87dc49f8 Fix shell quoting for command line arguments (#11734)
* Add shell quoting for command line arguments

* add shell escape logic from native

* resolve lint issues

* Refactor quoteArgument and getTask

* Add os specific shell quoting

* Correctly apply shell-quotes on Unix

* Fix lint

* fix lint

* Refactor quoteArgument logic
2023-11-30 10:01:19 -08:00
Sean McManus 30de9bcc27 Merge pull request #11725 from microsoft/main
Update for 1.19.1 (#11724)
2023-11-21 17:12:17 -08:00
Sean McManus cc4177b096 Update for 1.19.1 (#11724) 2023-11-21 14:58:42 -08:00
Sean McManus 100e2e0828 Merge pull request #11699 from microsoft/main
Merge for 1.19.0
2023-11-16 18:39:02 -08:00
Sean McManus a25b309ac7 Update for 1.19.0 (#11688)
* Update for 1.19.0
2023-11-16 17:01:15 -08:00
Sean McManus e7cb0a7c6a Merge pull request #11698 from microsoft/main
Merge for 1.18.5
2023-11-16 16:55:09 -08:00
Sean McManus b6f48cd1fe Update changelog and version for 1.18.5 (#11697) 2023-11-16 16:39:31 -08:00
Sean McManus ea391a3a17 Fix default Linux cache path. (#11696) 2023-11-16 15:46:03 -08:00
Sean McManus 4ba260c486 Merge pull request #11687 from microsoft/main
Merge for 1.18.4
2023-11-14 17:25:29 -08:00
Sean McManus 7cb9f88f6c Switch to a static import. Add telemetry. (#11686)
* Switch to a static import. Add telemetry.
2023-11-14 16:39:18 -08:00
Sean McManus 203823a6af Fix 'Extract to function' header selection state. (#11677)
* Fix 'Extract to function' header selection state.
* Update changelog.
2023-11-14 14:58:42 -08:00
Sean McManus 10564f909a Update changelog. 2023-11-14 14:41:00 -08:00
Sean McManus 383579dba3 Fix fetch call for VS Code before 1.82.0. (#11683) 2023-11-14 14:29:52 -08:00
Sean McManus e896231d88 Merge pull request #11671 from microsoft/main
Merge for 1.18.3 (4th time)
2023-11-13 15:15:12 -08:00
Sean McManus 5325b379c5 Open the modified header for 'Extract to function'. (#11670)
* Open the modified header for 'Extract to function'.
2023-11-13 15:13:09 -08:00
Sean McManus 1af06e1dd5 Update GitHub actions dependencies. (#11667) 2023-11-13 11:36:48 -08:00
Sean McManus 23fcef6dd8 Merge pull request #11661 from microsoft/main
Merger for 1.18.3 (3rd time)
2023-11-13 11:36:36 -08:00
Sean McManus c68caae1e7 Update TPN. (#11660) 2023-11-10 17:46:22 -08:00
Sean McManus 3dc4b8f626 Update vscode-tas-client. (#11658) 2023-11-10 16:12:44 -08:00
Sean McManus df5c16bddf Merge pull request #11654 from microsoft/seanmcm/1_18_3_release
Merge for 1.18.3
2023-11-10 11:06:38 -08:00
dependabot[bot] b008f1a1cc Bump axios from 0.27.2 to 1.6.0 in /.github/actions (#11651)
Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 01:45:18 -08:00
Sean McManus 3a3a31b9b8 Merge branch 'main' into seanmcm/1_18_3_release 2023-11-09 18:03:16 -08:00
Sean McManus 5504bdf63d Update changelog for 1.18.3 (#11648)
* Update changelog for 1.18.3
2023-11-09 17:55:43 -08:00
Sean McManus e3b41771c6 Merge pull request #11639 from microsoft/main
Merge for 1.18.2 (2nd time)
2023-11-08 12:34:50 -08:00
Sean McManus 7d051394e6 Remove the 'Extract to function' experimentalFeatures requirement. (#11638) 2023-11-08 12:29:01 -08:00
Sean McManus 3f7f3090f6 Merge pull request #11633 from microsoft/main
Merge for 1.18.2
2023-11-07 15:59:34 -08:00
Sean McManus 468149a9ad Update changelog/version for 1.18.2 (#11628)
* Update changelog.
* Update version.
2023-11-07 15:46:27 -08:00
[email protected] 6ec1d81ef0 [Auto] Localization - Translated Strings (#11290) 2023-11-07 08:55:54 -08:00
Sean McManus 6b5d3ee985 Fix 'Extract to function' formatting/selection bugs. (#11621)
* Fix 'Extract to function' formatting/selection bugs.
2023-11-06 14:45:18 -08:00
Spencer Bloom 5b3c4c70b5 Add error catching on await calls and a persistent bool tracking if the user is on the pre-release channel (or has been while there's been a pre-release available) (#11613) 2023-11-03 12:07:03 -07:00
Sean McManus 6d5e4c4114 Fix 'Extract to function' switching to the header. (#11616)
* Fix 'Extract to function' switching to the header.
2023-11-03 10:10:32 -07:00
Sean McManus 4149493f2c Merge pull request #11607 from microsoft/main
Merge for 1.18.1
2023-11-01 17:55:01 -07:00
Sean McManus c26054a1a6 Update version (#11606) 2023-11-01 16:46:13 -07:00
Sean McManus a20a3f2781 Update changelog for 1.18.1 (#11604) 2023-11-01 16:34:18 -07:00
Sean McManus e7f5d1731d Fix formatting bug with multiple changes. (#11599) 2023-11-01 14:07:29 -07:00
Sean McManus 16f6cf91c7 Change Extract to Function to name earlier. (#11568)
* Change Extract to Function to name earlier.
2023-10-31 11:56:52 -07:00
browntarik 45addfddb3 Add Missing Include Code Action (#11488)
* Add loc string and Add Missing Include handler

* Add AddMissingInclude Command and resolve lint

* Refactor codeActionProvider

* resolve formatting and append newline to includes

* Only apply new line to Add Missing Include

* Resolve lint issue

* Add new line specific to OS

* Resolve newline
2023-10-27 10:58:45 -07:00
Spencer Bloom 6f80226e88 Update walkthrough text for the customize debugging step. (#11580) 2023-10-25 14:56:11 -07:00
Spencer Bloom 8fbc56a688 Notify users if there's a pre-release version available. (#11569)
* Notify users if there's a pre-release version available
2023-10-24 16:10:21 -07:00
Bob Brown fecfc08451 update changelog (#11532) 2023-10-16 11:30:46 -07:00
Sean McManus 43aad3f65c Merge pull request #11528 from microsoft/main
Update changelog (2nd time) (#11527)
2023-10-12 17:21:18 -07:00
Sean McManus 62a03c2b21 Update changelog (2nd time) (#11527)
* Update changelog (2nd time).
2023-10-12 17:12:41 -07:00
Sean McManus bedcacb0a1 Merge pull request #11526 from microsoft/main
Merge for 1.18.0
2023-10-12 14:58:49 -07:00
Sean McManus 7273d6112b Update changelog for 1.18.0 (#11521) 2023-10-12 14:37:41 -07:00
Michelle Matias 74bddb82e5 Reuse workflow for CI builds (#11503) 2023-10-11 18:40:01 -07:00
Sean McManus 4af6ca9db0 Extract to function (#11467)
* Extract to function.
2023-10-11 17:27:36 -07:00
Michelle Matias 7e4ee25c48 remove CreateDeclDefnCommandArguments (#11517) 2023-10-10 12:31:23 -07:00
Sean McManus 6da9a49652 Updates for clang-tidy 17.0.1 (#11491) 2023-10-10 12:09:32 -07:00
Michelle Matias 51d88dbb24 Increase timeout for E2E tests (#11516) 2023-10-09 16:12:47 -07:00
Michelle Matias cd8ecf9060 Handle undefined environment variable (#11480) 2023-10-06 11:50:26 -07:00
Sean McManus 847ea0b73c Fix prepublish. (#11469) 2023-09-29 17:41:31 -07:00
Michelle Matias 68c7be9d9e Fix loading UI (#11486) 2023-09-29 13:06:38 -07:00
Michelle Matias 1bde544458 Add Include Header setting for refactoring actions (#11449) 2023-09-27 10:51:53 -07:00
Sean McManus f62cad6a2f Fix Initializing in the status bar instead of Indexing. (#11471) 2023-09-26 16:37:57 -07:00
Garrett Serack eec372a186 force module to node16 for ts-node (#11468) 2023-09-26 11:40:51 -07:00
Michelle Matias b98bb40a89 Update language server loc strings (#11445) 2023-09-25 17:29:54 -07:00
Colen Garoutte-Carson 4d1a2a0e90 Change how logging level is passed to native process (#11438) 2023-09-18 13:57:25 -07:00
Michelle Matias dec50598bc Remove obsolete experimental configuration code (#11427) 2023-09-14 17:12:03 -07:00
browntarik c5c64ad831 Update localized intellisense crash string (#11356)
* update localized intellisense crash string

* resolve string

* update hint

* resolve loc string

* resolve string locs

* resolve spelling error
2023-09-13 14:45:35 -07:00
Bob Brown 27153190e2 Compiler acquisition (#11286) 2023-09-13 11:54:29 -07:00
Sean McManus 2cc55ea6eb Add keyboard support for Inline Macro. (#11261)
* Add keyboard support for Inline Macro.
* Enable inline macro without hover.
* Standardize localize string naming.
* Fix spelling errors involving strings types.
2023-09-11 09:56:16 -07:00
Garrett Serack 121a657acb make translations export work correctly in CI (#11415) 2023-09-08 07:53:49 -07:00
dependabot[bot] 6a54986b3f Bump mongodb from 4.8.1 to 4.17.0 in /.github/actions (#11413)
Bumps [mongodb](https://github.com/mongodb/node-mongodb-native) from 4.8.1 to 4.17.0.
- [Release notes](https://github.com/mongodb/node-mongodb-native/releases)
- [Changelog](https://github.com/mongodb/node-mongodb-native/blob/v4.17.0/HISTORY.md)
- [Commits](https://github.com/mongodb/node-mongodb-native/compare/v4.8.1...v4.17.0)

---
updated-dependencies:
- dependency-name: mongodb
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 09:52:11 -07:00
Garrett Serack b4a70dfc0a Make yarn tasks imply yarn install where appropriate (#11394)
* made sure that yarn install gets called before compile

* Add some nice messages

* better detection

* cleaned up more

* more tweaks

* remove old checks

* let unit tests run without binaries

* turn off scenario tests until binaries can be installed

* add another rule
2023-09-06 07:47:36 -07:00
browntarik efa5c2244b Rework Database Storage Path Logic (#11309)
* Fix typo (#11275)

* rework database logic

* resolve PR

* fix lint issues

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* update names

* resolve PR

* resolve PR

* fix lint error

* resolve PR

* resolve PR
2023-09-05 13:35:11 -07:00
Sean McManus 4199155228 Update TPN. (#11393) 2023-08-31 12:56:15 -07:00
Garrett Serack d949d93924 Apply strict eslint rule (#11389) 2023-08-31 09:26:55 -07:00
Marcin Strzyz 44e2a0ec4c added enforcement of no array constructor. (#11385) 2023-08-30 13:12:41 -07:00
Marcin Strzyz 0cd369c603 Incremental. (#11383) 2023-08-30 13:04:01 -07:00
Marcin Strzyz 76fce67276 Added typing guards. (#11382) 2023-08-29 18:05:33 -07:00
Marcin Strzyz f3e0f0bb05 Added enforcement. (#11381) 2023-08-29 16:54:14 -07:00
Garrett Serack 628301be37 Test restructuring and cleanup (#11262)
* updated files

* queue and ready are now separate

* checkpoint

* found it! fixed missing call

* cleaned up and refactored a bit

* cleanup

* whoops. make sure linter runs!

* Make the queue itself static

* addressed formatting issues, added more rules to eslint

* more formatting, made ready Promise/void

* checkpoint

* checkpoint

* checkpoint

* checkpoint (linting)

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* renamed path to filepath.

* checkpoint

* checkpoint

* so close...

* checkpoint again

* before making doc

* checkpoint

* checkpoint

* Checkpoint

* renamed awaiters

* eslint

* fix format on generated native strings

* add dummy pretest task back in for the moment

* change unit test runing

* posix calc test failure

* make signal dispose better

* add 	est regen script

* missed file

* checkpoint

* Improve scripts a bit

* remove hooks for now

* remove unused script

* remove unused script

* filter out files

* ensure that eslint works for scripts too

* fix build oses to specific version

* cleanups and tweaking

* adjusted for cosmetic feedback

* more

* add eslint rule to fix space before/after semicolon

* remove tba/tbd

* cleanup

* Added space-infix-ops rule

* cleanup

* resolve comments

* resolve comments

* add simple debug task

* spelling fixes

* cleanup more

* More changes. yay

* remove the extra whitespace from before comments

* add eslint rule to ensure that there are never extra spaces

* adding another eslint rule to ensure that there isn't spacing around unary operators, which we all know is dangerous. Or weird. I forget which

* added a space between vs and code because a space is the desired format

* removed all mentions of transpiler which was removed

* removed an extra comma

* removed a trailing slash

* removed useless lines

* missed as file

* reconfigure no-extra-parens rule

* added note about yarn install

* whatever

* more fun

* FIx it so that it webpacks correctly

* remove refernces to attic

* restore line to correct check

* fix whitespace

* added blank yarn install

* removed
2023-08-29 16:08:07 -07:00
browntarik 6efaafef60 place markdownInComments setting under code doc (#11380) 2023-08-29 14:53:18 -07:00
Michelle Matias f387815749 Fix tag parse language status item UI (#11354) 2023-08-25 15:50:03 -07:00
Michelle Matias ef04f022d2 Merge pull request #11366 from microsoft/dev/mimatias/r-17-5
1.17.5 merge
2023-08-25 13:53:11 -07:00
Michelle Matias 1efac2736a 1.17.5 changelog (#11363) 2023-08-25 13:50:58 -07:00
Michelle Matias c873aa18bd 1.17.5 changelog (#11363) 2023-08-25 13:50:14 -07:00
Colen Garoutte-Carson 9299e8df95 Disable AutoPCH early on platforms that don't support it (#11362) 2023-08-25 12:53:37 -07:00
Michelle Matias 97363a3e57 Reset FAR UI if no results returned (#11359) 2023-08-25 12:53:33 -07:00
Colen Garoutte-Carson 78a8ff3bb3 Disable AutoPCH early on platforms that don't support it (#11362) 2023-08-24 18:29:52 -07:00
Michelle Matias 3033657a19 Reset FAR UI if no results returned (#11359) 2023-08-23 18:03:44 -07:00
Sean McManus ac118f453b Fix formatting for IntelliSense loc strings. (#11348)
* Fix formatting for loc strings.
2023-08-22 15:04:23 -07:00
Sean McManus 28d5715dd5 Merge pull request #11347 from microsoft/seanmcm/1_17_4_release
Three cherry-picks for 1.17.4
2023-08-21 11:29:08 -07:00
Sean McManus 8466888bc8 Update changelog and version for 1.17.4 (#11340)
* Update changelog and version for 1.17.4
* Add a missed entry.
2023-08-21 11:11:07 -07:00
Sean McManus 741e1ed78a Fix crash called by missing IntelliSense loc strings. (#11339) 2023-08-21 11:10:55 -07:00
Garrett Serack e02b0a33a6 Enqueue the call to sendDidOpen (#11337)
* enqueue the call to sendDidOpen
2023-08-21 11:10:42 -07:00
Sean McManus 9e10a71ffb Update changelog and version for 1.17.4 (#11340)
* Update changelog and version for 1.17.4
* Add a missed entry.
2023-08-21 11:08:15 -07:00
Sean McManus 4525bd0ed5 Fix crash called by missing IntelliSense loc strings. (#11339) 2023-08-21 10:40:35 -07:00
Garrett Serack 89d0a7a01f Enqueue the call to sendDidOpen (#11337)
* enqueue the call to sendDidOpen
2023-08-21 10:32:47 -07:00
Colen Garoutte-Carson 27cd52a1b9 Replace use of yauzl with node-stream-zip (#11304) 2023-08-17 18:42:56 -07:00
Colen Garoutte-Carson 47785c4f98 Merge pull request #11331 from microsoft/main 2023-08-16 18:16:18 -07:00
Colen Garoutte-Carson e020a75bb7 Merge branch 'release' into main 2023-08-16 17:55:19 -07:00
Colen Garoutte-Carson c8a7776222 Update version and changelog for 1.17.3 (#11330) 2023-08-16 17:50:39 -07:00
Bob Brown 3934ef89ea Fix bug introduced by #11175 (#11329) 2023-08-16 16:46:17 -07:00
Michelle Matias d60499f793 Merge pull request #11319 from microsoft/mimatias/r-17
1.17.2 release merge
2023-08-14 12:54:16 -07:00
Michelle Matias 9b359ff73b Merge branch 'main' into mimatias/r-17 2023-08-14 12:45:28 -07:00
Michelle Matias fc9c45c34f 1.17.2 changelog (#11317) 2023-08-14 12:23:09 -07:00
Bob Brown 212fff2828 log machine id mappings for VS to VS Code (#11308)
* log machine id mappings for VS to VS Code

* update comment

* in case execChildProcess throws
2023-08-11 16:13:33 -07:00
Sean McManus a5f8f84b43 Merge pull request #11303 from microsoft/main
Merge for 1.17.1
2023-08-08 17:51:04 -07:00
browntarik 44e3bbe773 Update Changelog (#11302) 2023-08-08 17:35:02 -07:00
Bob Brown 90f922d651 default to c++14 on mac for build and run active file (#11300) 2023-08-08 14:52:42 -07:00
Colen Garoutte-Carson 408051429d Fix issue with currently selected compiler being listed last in task list (#11299) 2023-08-07 16:28:58 -07:00
Bob Brown ae904ec330 Fix the build getting stuck when /link /out: is used to specify the program name (#11281)
* Also make sure the mkdir command works
2023-08-03 13:13:03 -07:00
[email protected] 3bde088a06 [Auto] Localization - Translated Strings (#11118) 2023-08-03 12:08:50 -07:00
browntarik 9d28ba1e06 Prevent vcpkg code action from appearing in all unrelated code action menus (#11280)
* prevent vcpkg code action from appearing

* resolve PR

* resolve PR
2023-08-02 14:11:42 -07:00
melody 514e60863d Fix typo (#11275) 2023-08-01 15:05:50 -07:00
Michelle Matias 98af6a4888 Show relative path for call hierarchy item if available (#11265) 2023-07-31 18:00:59 -07:00
Michelle Matias b740f603ec Use selectionRange for call hierarchy request input (#11264) 2023-07-31 17:12:19 -07:00
Sean McManus 6b2099471d Clean up the command palette. (#11259)
* Clean up the command palette.
2023-07-28 14:45:31 -07:00
Sean McManus c76105e28e Add vscode.d.ts to .eslintignore. (#11258)
* Add vscode.d.ts to .eslintignore.
2023-07-28 09:03:18 -07:00
Michelle Matias 70ff2a296a Update compilerPath if c_cpp_properties.json exists (#11257) 2023-07-27 12:51:31 -07:00
Michelle Matias c3e3bd306f "Select IntelliSense Configuration" updates compilerPath in c_cpp_properties.json (#11255) 2023-07-27 11:40:04 -07:00
Sean McManus e53b190380 Merge pull request #11253 from microsoft/main
Merge (again) for 1.17.0
2023-07-26 16:56:43 -07:00
Sean McManus 4f805c4263 Update changelog (again) for 1.17.0 (#11251)
* Update changelog.
2023-07-26 16:26:40 -07:00
Michał Mąka a7870fc1b2 Added support for Toybox to remote process picker (#11175)
* Added separate remote process command for ToyBox
2023-07-26 16:08:07 -07:00
Michelle Matias 1846fd4001 Merge pull request #11250 from microsoft/main 2023-07-26 14:15:17 -07:00
Michelle Matias d48fd4343b fix merge (#11249) 2023-07-26 14:11:18 -07:00
Colen Garoutte-Carson 62e09945e3 Merge pull request #11241 from microsoft/main 2023-07-24 17:32:28 -07:00
Michelle Matias 9ce7b5a87c update change log (#11240) 2023-07-24 16:35:29 -07:00
Michelle Matias 460aee5971 'Create Declaration / Definition' command via 'Quick Fix...' hover (#11239) 2023-07-24 15:49:19 -07:00
Sean McManus 0e309a7e7f Fix config provider ordering. (#11237) 2023-07-24 11:48:18 -07:00
Sean McManus 27f9fafc73 Fix console logging. (#11233) 2023-07-24 10:38:26 -07:00
Michelle Matias c9b0db02fd Merge pull request #11230 from microsoft/main
Merge 1.17.0
2023-07-21 14:08:21 -07:00
Sean McManus 72ea4d5eb9 Update ThirdPartyNotices.txt. (#11232) 2023-07-21 13:52:52 -07:00
Michelle Matias 3c63457e38 changelog 17 (#11227) 2023-07-21 13:19:32 -07:00
Garrett Serack 477eb06f2b Fix out-of-order message handling (#11212) 2023-07-21 12:44:14 -07:00
dependabot[bot] 62b27eadce Bump word-wrap from 1.2.3 to 1.2.4 in /.github/actions (#11213) 2023-07-18 15:25:09 -07:00
browntarik 668499169e Add Setting to Enable Markdown Comment Formatting (#11177)
* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR
2023-07-18 14:34:25 -07:00
Bob Brown 2133b871be Remove walkthrough experiment and update the Help links to point to it (#11191) 2023-07-18 15:46:52 +00:00
Bob Brown d6370f3dcf compliance: update dependencies to remove usage of fsevents 1.2.7 (#11206) 2023-07-17 12:54:43 -07:00
Sean McManus 4589c6a731 Update IntelliSense loc strings. (#11193) 2023-07-14 15:50:57 -07:00
Sean McManus c4ea718dd5 Update ThirdPartyNotices.txt again. (#11184) 2023-07-11 17:58:15 -07:00
dependabot[bot] f26308c09f Bump semver from 5.7.1 to 5.7.2 in /.github/actions (#11183) 2023-07-11 16:44:36 -07:00
Sean McManus 420b479896 Update package.json/yarn.lock (#11181)
* Update yarn.lock.
* Clean up old/unneeded resolutions.
2023-07-11 16:34:49 -07:00
Colen Garoutte-Carson 2dfbeb16b2 Add license for SoftFloat to ThirdPartyNotices.txt (#11168) 2023-07-07 11:24:36 -07:00
Sean McManus f293e59478 Update IntelliSense loc strings. (#11166) 2023-07-06 18:55:15 -07:00
browntarik b747b98cde resolve paths with /, /*, /** and \\** (#11136)
* resolve paths with '/', '/*', '/**' and '\\**'

* resolve multiple path parsing

* create generalized approach for wildcard support

* Add windows conditional for backslashes

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve variables for globs

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR

* resolve PR
2023-07-06 16:25:22 -07:00
Sean McManus 094596961a Update ThirdPartyNotices.txt (#11144) 2023-06-30 11:38:36 -07:00
Garrett Serack 503f95b085 Modernize packages, code patterns (#11085)
Modernize packages, code patterns
2023-06-29 13:18:48 -07:00
3612c02d07 Add wildcard support for includeDir (#10388)
For example, using the following tree:

  rootUri
  - sources
    - main
      - main.c
    - vendor
      - khash.h
  - headers
    - C001
      - a.h
    - C002
      - b.h

The following directory paths works:

- `sources/**`  for plain old recursive path
- `headers/C*/` dynamic path
- `missing/`    reported as "not found"
- `missing/*`   expanded as empty result (silent fail)

Note: bakslash paths need to be slash-converted to avoid be considered as "Dynamic"

Co-authored-by: Sean McManus <[email protected]>
Co-authored-by: browntarik <[email protected]>
2023-06-27 09:53:35 -07:00
Michelle Matias ddbc92a990 1.16.3 changelog (#11125) 2023-06-23 16:55:56 -07:00
Colen Garoutte-Carson ce587c6f06 Fix possible race condition that could lead to multiple didOpen's (#11120) 2023-06-22 19:26:13 -07:00
Michelle Matias 51da619eec Merge pull request #11099 from microsoft/main
1.16.1 pre-release
2023-06-15 21:19:13 -07:00
Michelle Matias 3eb50568e9 Merge pull request #10986 from microsoft/main
[Auto] Localization - Translated Strings (#10889)
2023-05-22 13:53:52 -07:00
Michelle Matias 866b145645 Merge pull request #10975 from microsoft/main
1.16.0 pre-release
2023-05-19 15:52:02 -07:00
Sean McManus 9762fe5397 Merge pull request #10862 from microsoft/main
Merge for 1.15.3 (2nd time)
2023-04-21 19:00:16 -07:00
Sean McManus 377896c30a Merge pull request #10846 from microsoft/main
Merge for 1.15.3
2023-04-20 18:55:05 -07:00
Michelle Matias 98f13a6f11 Merge pull request #10815 from microsoft/main
Don't put the compiler selection in the global settings if using the …
2023-04-12 17:57:26 -07:00
Michelle Matias 0d85aea687 Merge pull request #10813 from microsoft/main
Revert walkthrough doc links until walkthrough is published (#10812)
2023-04-12 15:51:05 -07:00
Sean McManus 25d2b76514 Merge pull request #10811 from microsoft/main
Merge for 1.15.2
2023-04-12 11:03:43 -07:00
Sean McManus 42dfef3f6b Merge pull request #10728 from microsoft/main
Merge for 1.15.1
2023-03-22 11:43:15 -07:00
Sean McManus 1ce1e9cd71 Merge pull request #10716 from microsoft/main
Update changelog for 1.15.1. (#10708)
2023-03-21 09:53:45 -07:00
Sean McManus 65163966d5 Merge pull request #10679 from microsoft/main
Merge for 1.15.0
2023-03-15 17:17:35 -07:00
Sean McManus edf8e0a155 Merge pull request #10504 from microsoft/main
Merge for 1.14.2 (2nd time)
2023-02-09 16:30:37 -08:00
Sean McManus 4083075476 Merge pull request #10501 from microsoft/main
Merge for 1.14.2
2023-02-09 14:26:59 -08:00
Michelle Matias b745ebc218 Merge pull request #10453 from microsoft/main
1.14.1 pre-release merge
2023-02-01 14:29:00 -08:00
Michelle Matias b69d17a0f5 Merge pull request #10378 from microsoft/seanmcm/1_14_0_insiders
Merge for 1.14.0
2023-01-11 20:00:38 -08:00
Sean McManus be8b6fb693 Merge branch 'main' into seanmcm/1_14_0_insiders 2023-01-11 19:07:54 -08:00
603 changed files with 83761 additions and 67107 deletions
+86
View File
@@ -0,0 +1,86 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddComment = void 0;
const ActionBase_1 = require("../common/ActionBase");
const utils_1 = require("../common/utils");
class AddComment extends ActionBase_1.ActionBase {
constructor(github, createdAfter, afterDays, labels, addComment, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
this.github = github;
this.createdAfter = createdAfter;
this.afterDays = afterDays;
this.addComment = addComment;
this.addLabels = addLabels;
this.removeLabels = removeLabels;
this.setMilestoneId = setMilestoneId;
}
async run() {
const updatedTimestamp = this.afterDays ? (0, utils_1.daysAgoToHumanReadbleDate)(this.afterDays) : undefined;
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") +
(this.createdAfter ? `created:>${this.createdAfter} ` : "") +
"is:open is:unlocked");
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
for await (const page of this.github.query({ q: query })) {
for (const issue of page) {
const hydrated = await issue.getIssue();
if (hydrated.open && this.validateIssue(hydrated)
// TODO: Verify updated timestamp
) {
// Don't add a comment if already commented on by an action.
let foundActionComment = false;
for await (const commentBatch of issue.getComments()) {
for (const comment of commentBatch) {
if (comment.author.isGitHubApp) {
foundActionComment = true;
break;
}
}
if (foundActionComment)
break;
}
if (foundActionComment) {
(0, utils_1.safeLog)(`Issue ${hydrated.number} already commented on by an action. Ignoring.`);
continue;
}
if (this.addComment) {
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
await issue.postComment(this.addComment);
}
if (removeLabelsSet.length > 0) {
for (const removeLabel of removeLabelsSet) {
if (removeLabel && removeLabel.length > 0) {
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
await issue.removeLabel(removeLabel);
}
}
}
if (addLabelsSet.length > 0) {
for (const addLabel of addLabelsSet) {
if (addLabel && addLabel.length > 0) {
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
await issue.addLabel(addLabel);
}
}
}
if (this.setMilestoneId != undefined) {
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
await issue.setMilestone(+this.setMilestoneId);
}
(0, utils_1.safeLog)(`Processing issue ${hydrated.number}.`);
}
else {
if (!hydrated.open) {
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
}
}
}
}
}
}
exports.AddComment = AddComment;
//# sourceMappingURL=AddComment.js.map
+98
View File
@@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { GitHub } from '../api/api';
import { ActionBase } from '../common/ActionBase';
import { daysAgoToHumanReadbleDate, daysAgoToTimestamp, safeLog } from '../common/utils';
export class AddComment extends ActionBase {
constructor(
private github: GitHub,
private createdAfter: string | undefined,
private afterDays: number,
labels: string,
private addComment: string,
private addLabels?: string,
private removeLabels?: string,
private setMilestoneId?: string,
milestoneName?: string,
milestoneId?: string,
ignoreLabels?: string,
ignoreMilestoneNames?: string,
ignoreMilestoneIds?: string,
minimumVotes?: number,
maximumVotes?: number,
involves?: string
) {
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
}
async run() {
const updatedTimestamp = this.afterDays ? daysAgoToHumanReadbleDate(this.afterDays) : undefined;
const query = this.buildQuery(
(updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") +
(this.createdAfter ? `created:>${this.createdAfter} ` : "") +
"is:open is:unlocked");
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
for await (const page of this.github.query({ q: query })) {
for (const issue of page) {
const hydrated = await issue.getIssue();
if (hydrated.open && this.validateIssue(hydrated)
// TODO: Verify updated timestamp
) {
// Don't add a comment if already commented on by an action.
let foundActionComment = false;
for await (const commentBatch of issue.getComments()) {
for (const comment of commentBatch) {
if (comment.author.isGitHubApp) {
foundActionComment = true;
break;
}
}
if (foundActionComment)
break;
}
if (foundActionComment) {
safeLog(`Issue ${hydrated.number} already commented on by an action. Ignoring.`);
continue;
}
if (this.addComment) {
safeLog(`Posting comment on issue ${hydrated.number}`);
await issue.postComment(this.addComment);
}
if (removeLabelsSet.length > 0) {
for (const removeLabel of removeLabelsSet) {
if (removeLabel && removeLabel.length > 0) {
safeLog(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
await issue.removeLabel(removeLabel);
}
}
}
if (addLabelsSet.length > 0) {
for (const addLabel of addLabelsSet) {
if (addLabel && addLabel.length > 0) {
safeLog(`Adding label on issue ${hydrated.number}: ${addLabel}`);
await issue.addLabel(addLabel);
}
}
}
if (this.setMilestoneId != undefined) {
safeLog(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
await issue.setMilestone(+this.setMilestoneId);
}
safeLog(`Processing issue ${hydrated.number}.`);
} else {
if (!hydrated.open) {
safeLog(`Issue ${hydrated.number} is not open. Ignoring`);
}
}
}
}
}
}
+42
View File
@@ -0,0 +1,42 @@
name: Add Comment and Label
description: Add comment (etc) to issues that are marked with a specified label (etc)
inputs:
token:
description: GitHub token with issue, comment, and label read/write permissions
default: ${{ github.token }}
createdAfter:
description: Creation date after which to be considered.
required: false
afterDays:
description: Days to wait before performing this action (may be 0).
required: false
addComment:
description: Comment to add
labels:
description: items with these labels will be considered. May be "*".
required: true
milestoneName:
description: items with these milestones will be considered (name only, must match ID)
milestoneId:
description: items with these milestones will be considered (id only, must match name)
ignoreLabels:
description: items with these labels will not be considered
ignoreMilestoneNames:
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
ignoreMilestoneIds:
description: items with these milestones will not be considered (IDs only, must match names)
addLabels:
description: Labels to add to issue.
removeLabels:
description: Labels to remove from issue.
minimumVotes:
descriptions: Only issues with at least this many votes will be considered.
maximumVotes:
descriptions: Only issues fewer or equal to this many votes will be considered.
involves:
descriptions: Qualifier to find issues that in some way involve a certain user either as an author, assignee, or mentions.
readonly:
description: If true, changes are not applied.
runs:
using: 'node12'
main: 'index.js'
+20
View File
@@ -0,0 +1,20 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../common/utils");
const AddComment_1 = require("./AddComment");
const Action_1 = require("../common/Action");
class AddCommentAction extends Action_1.Action {
constructor() {
super(...arguments);
this.id = 'AddComment';
}
async onTriggered(github) {
await new AddComment_1.AddComment(github, (0, utils_1.getInput)('createdAfter') || undefined, +((0, utils_1.getInput)('afterDays') || 0), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('addComment') || '', (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
}
}
new AddCommentAction().run(); // eslint-disable-line
//# sourceMappingURL=index.js.map
+36
View File
@@ -0,0 +1,36 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OctoKit } from '../api/octokit'
import { getInput, getRequiredInput } from '../common/utils'
import { AddComment } from './AddComment'
import { Action } from '../common/Action'
class AddCommentAction extends Action {
id = 'AddComment';
async onTriggered(github: OctoKit) {
await new AddComment(
github,
getInput('createdAfter') || undefined,
+(getInput('afterDays') || 0),
getRequiredInput('labels'),
getInput('addComment') || '',
getInput('addLabels') || undefined,
getInput('removeLabels') || undefined,
getInput('setMilestoneId') || undefined,
getInput('milestoneName') || undefined,
getInput('milestoneId') || undefined,
getInput('ignoreLabels') || undefined,
getInput('ignoreMilestoneNames') || undefined,
getInput('ignoreMilestoneIds') || undefined,
+(getInput('minimumVotes') || 0),
+(getInput('maximumVotes') || 9999999),
getInput('involves') || undefined
).run();
}
}
new AddCommentAction().run(); // eslint-disable-line
+1 -1
View File
@@ -15,7 +15,7 @@ inputs:
milestoneId:
description: items with these milestones will be considered (id only, must match name)
labels:
description: items with these labels will not be considered. May be "*".
description: items with these labels will be considered. May be "*".
ignoreMilestoneNames:
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
ignoreMilestoneIds:
+1 -1
View File
@@ -19,7 +19,7 @@ inputs:
milestoneId:
description: items with these milestones will be considered (id only, must match name)
labels:
description: items with these labels will not be considered. May be "*".
description: items with these labels will be considered. May be "*".
ignoreMilestoneNames:
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
ignoreMilestoneIds:
+105 -105
View File
@@ -1,106 +1,106 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.StaleCloser = void 0;
const ActionBase_1 = require("../common/ActionBase");
const utils_1 = require("../common/utils");
class StaleCloser extends ActionBase_1.ActionBase {
constructor(github, closeDays, labels, closeComment, pingDays, pingComment, additionalTeam, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
this.github = github;
this.closeDays = closeDays;
this.closeComment = closeComment;
this.pingDays = pingDays;
this.pingComment = pingComment;
this.additionalTeam = additionalTeam;
this.addLabels = addLabels;
this.removeLabels = removeLabels;
this.setMilestoneId = setMilestoneId;
}
async run() {
const updatedTimestamp = (0, utils_1.daysAgoToHumanReadbleDate)(this.closeDays);
const pingTimestamp = this.pingDays ? (0, utils_1.daysAgoToTimestamp)(this.pingDays) : undefined;
const query = this.buildQuery((this.closeDays ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
for await (const page of this.github.query({ q: query })) {
for (const issue of page) {
const hydrated = await issue.getIssue();
const lastCommentIterator = await issue.getComments(true).next();
if (lastCommentIterator.done) {
throw Error('Unexpected comment data');
}
const lastComment = lastCommentIterator.value[0];
if (hydrated.open && this.validateIssue(hydrated)
// TODO: Verify updated timestamp
) {
if (!lastComment ||
lastComment.author.isGitHubApp ||
pingTimestamp == undefined ||
// TODO: List the collaborators once per go rather than checking a single user each issue
this.additionalTeam.includes(lastComment.author.name) ||
await issue.hasWriteAccess(lastComment.author)) {
if (pingTimestamp != undefined) {
if (lastComment) {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Closing.`);
}
else {
(0, utils_1.safeLog)(`No comments on issue ${hydrated.number}. Closing.`);
}
}
if (this.closeComment) {
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
await issue.postComment(this.closeComment);
}
if (removeLabelsSet.length > 0) {
for (const removeLabel of removeLabelsSet) {
if (removeLabel && removeLabel.length > 0) {
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
await issue.removeLabel(removeLabel);
}
}
}
if (addLabelsSet.length > 0) {
for (const addLabel of addLabelsSet) {
if (addLabel && addLabel.length > 0) {
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
await issue.addLabel(addLabel);
}
}
}
await issue.closeIssue("not_planned");
if (this.setMilestoneId != undefined) {
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
await issue.setMilestone(+this.setMilestoneId);
}
(0, utils_1.safeLog)(`Closing issue ${hydrated.number}.`);
}
else {
// Ping
if (hydrated.updatedAt < pingTimestamp && hydrated.assignee) {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Pinging @${hydrated.assignee}`);
if (this.pingComment) {
await issue.postComment(this.pingComment
.replace('${assignee}', hydrated.assignee)
.replace('${author}', hydrated.author.name));
}
}
else {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Skipping.${hydrated.assignee ? ' cc @' + hydrated.assignee : ''}`);
}
}
}
else {
if (!hydrated.open) {
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
}
}
}
}
}
}
exports.StaleCloser = StaleCloser;
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.StaleCloser = void 0;
const ActionBase_1 = require("../common/ActionBase");
const utils_1 = require("../common/utils");
class StaleCloser extends ActionBase_1.ActionBase {
constructor(github, closeDays, labels, closeComment, pingDays, pingComment, additionalTeam, addLabels, removeLabels, setMilestoneId, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
super(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves);
this.github = github;
this.closeDays = closeDays;
this.closeComment = closeComment;
this.pingDays = pingDays;
this.pingComment = pingComment;
this.additionalTeam = additionalTeam;
this.addLabels = addLabels;
this.removeLabels = removeLabels;
this.setMilestoneId = setMilestoneId;
}
async run() {
const updatedTimestamp = this.closeDays ? (0, utils_1.daysAgoToHumanReadbleDate)(this.closeDays) : undefined;
const pingTimestamp = this.pingDays ? (0, utils_1.daysAgoToTimestamp)(this.pingDays) : undefined;
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
for await (const page of this.github.query({ q: query })) {
for (const issue of page) {
const hydrated = await issue.getIssue();
const lastCommentIterator = await issue.getComments(true).next();
if (lastCommentIterator.done) {
throw Error('Unexpected comment data');
}
const lastComment = lastCommentIterator.value[0];
if (hydrated.open && this.validateIssue(hydrated)
// TODO: Verify updated timestamp
) {
if (!lastComment ||
lastComment.author.isGitHubApp ||
pingTimestamp == undefined ||
// TODO: List the collaborators once per go rather than checking a single user each issue
this.additionalTeam.includes(lastComment.author.name) ||
await issue.hasWriteAccess(lastComment.author)) {
if (pingTimestamp != undefined) {
if (lastComment) {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Closing.`);
}
else {
(0, utils_1.safeLog)(`No comments on issue ${hydrated.number}. Closing.`);
}
}
if (this.closeComment) {
(0, utils_1.safeLog)(`Posting comment on issue ${hydrated.number}`);
await issue.postComment(this.closeComment);
}
if (removeLabelsSet.length > 0) {
for (const removeLabel of removeLabelsSet) {
if (removeLabel && removeLabel.length > 0) {
(0, utils_1.safeLog)(`Removing label on issue ${hydrated.number}: ${removeLabel}`);
await issue.removeLabel(removeLabel);
}
}
}
if (addLabelsSet.length > 0) {
for (const addLabel of addLabelsSet) {
if (addLabel && addLabel.length > 0) {
(0, utils_1.safeLog)(`Adding label on issue ${hydrated.number}: ${addLabel}`);
await issue.addLabel(addLabel);
}
}
}
await issue.closeIssue("not_planned");
if (this.setMilestoneId != undefined) {
(0, utils_1.safeLog)(`Setting milestone of issue ${hydrated.number} to id ${+this.setMilestoneId}`);
await issue.setMilestone(+this.setMilestoneId);
}
(0, utils_1.safeLog)(`Closing issue ${hydrated.number}.`);
}
else {
// Ping
if (hydrated.updatedAt < pingTimestamp && hydrated.assignee) {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Pinging @${hydrated.assignee}`);
if (this.pingComment) {
await issue.postComment(this.pingComment
.replace('${assignee}', hydrated.assignee)
.replace('${author}', hydrated.author.name));
}
}
else {
(0, utils_1.safeLog)(`Last comment on issue ${hydrated.number} by ${lastComment.author.name}. Skipping.${hydrated.assignee ? ' cc @' + hydrated.assignee : ''}`);
}
}
}
else {
if (!hydrated.open) {
(0, utils_1.safeLog)(`Issue ${hydrated.number} is not open. Ignoring`);
}
}
}
}
}
}
exports.StaleCloser = StaleCloser;
//# sourceMappingURL=StaleCloser.js.map
+2 -2
View File
@@ -33,10 +33,10 @@ export class StaleCloser extends ActionBase {
}
async run() {
const updatedTimestamp = daysAgoToHumanReadbleDate(this.closeDays);
const updatedTimestamp = this.closeDays ? daysAgoToHumanReadbleDate(this.closeDays) : undefined;
const pingTimestamp = this.pingDays ? daysAgoToTimestamp(this.pingDays) : undefined;
const query = this.buildQuery((this.closeDays ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
const query = this.buildQuery((updatedTimestamp ? `updated:<${updatedTimestamp} ` : "") + "is:open is:unlocked");
const addLabelsSet = this.addLabels ? this.addLabels.split(',') : [];
const removeLabelsSet = this.removeLabels ? this.removeLabels.split(',') : [];
+1 -1
View File
@@ -20,7 +20,7 @@ inputs:
milestoneId:
description: items with these milestones will be considered (id only, must match name)
labels:
description: items with these labels will not be considered. May be "*".
description: items with these labels will be considered. May be "*".
required: true
ignoreMilestoneNames:
description: items with these milestones will not be considered (names only, must match IDs). May be "*".
+20 -20
View File
@@ -1,21 +1,21 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../common/utils");
const StaleCloser_1 = require("./StaleCloser");
const Action_1 = require("../common/Action");
class StaleCloserAction extends Action_1.Action {
constructor() {
super(...arguments);
this.id = 'StaleCloser';
}
async onTriggered(github) {
var _a;
await new StaleCloser_1.StaleCloser(github, +(0, utils_1.getRequiredInput)('closeDays'), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('closeComment') || '', +((0, utils_1.getInput)('pingDays') || 0), (0, utils_1.getInput)('pingComment') || '', ((_a = (0, utils_1.getInput)('additionalTeam')) !== null && _a !== void 0 ? _a : '').split(','), (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
}
}
new StaleCloserAction().run(); // eslint-disable-line
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../common/utils");
const StaleCloser_1 = require("./StaleCloser");
const Action_1 = require("../common/Action");
class StaleCloserAction extends Action_1.Action {
constructor() {
super(...arguments);
this.id = 'StaleCloser';
}
async onTriggered(github) {
var _a;
await new StaleCloser_1.StaleCloser(github, +(0, utils_1.getRequiredInput)('closeDays'), (0, utils_1.getRequiredInput)('labels'), (0, utils_1.getInput)('closeComment') || '', +((0, utils_1.getInput)('pingDays') || 0), (0, utils_1.getInput)('pingComment') || '', ((_a = (0, utils_1.getInput)('additionalTeam')) !== null && _a !== void 0 ? _a : '').split(','), (0, utils_1.getInput)('addLabels') || undefined, (0, utils_1.getInput)('removeLabels') || undefined, (0, utils_1.getInput)('setMilestoneId') || undefined, (0, utils_1.getInput)('milestoneName') || undefined, (0, utils_1.getInput)('milestoneId') || undefined, (0, utils_1.getInput)('ignoreLabels') || undefined, (0, utils_1.getInput)('ignoreMilestoneNames') || undefined, (0, utils_1.getInput)('ignoreMilestoneIds') || undefined, +((0, utils_1.getInput)('minimumVotes') || 0), +((0, utils_1.getInput)('maximumVotes') || 9999999), (0, utils_1.getInput)('involves') || undefined).run();
}
}
new StaleCloserAction().run(); // eslint-disable-line
//# sourceMappingURL=index.js.map
+4 -4
View File
@@ -12,6 +12,10 @@ let numRequests = 0;
const getNumRequests = () => numRequests;
exports.getNumRequests = getNumRequests;
class OctoKit {
get octokit() {
numRequests++;
return this._octokit;
}
constructor(token, params, options = { readonly: false }) {
this.token = token;
this.params = params;
@@ -23,10 +27,6 @@ class OctoKit {
this.repoName = params.repo;
this.repoOwner = params.owner;
}
get octokit() {
numRequests++;
return this._octokit;
}
getIssueByNumber(number) {
return new OctoKitIssue(this.token, this.params, { number: number });
}
+182 -182
View File
@@ -1,183 +1,183 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionBase = void 0;
const utils_1 = require("./utils");
class ActionBase {
constructor(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
this.labels = labels;
this.milestoneName = milestoneName;
this.milestoneId = milestoneId;
this.ignoreLabels = ignoreLabels;
this.ignoreMilestoneNames = ignoreMilestoneNames;
this.ignoreMilestoneIds = ignoreMilestoneIds;
this.minimumVotes = minimumVotes;
this.maximumVotes = maximumVotes;
this.involves = involves;
this.labelsSet = [];
this.ignoreLabelsSet = [];
this.ignoreMilestoneNamesSet = [];
this.ignoreMilestoneIdsSet = [];
this.ignoreAllWithLabels = false;
this.ignoreAllWithMilestones = false;
this.involvesSet = [];
}
buildQuery(baseQuery) {
var _a, _b, _c, _d, _e, _f;
let query = baseQuery;
(0, utils_1.safeLog)(`labels: ${this.labels}`);
(0, utils_1.safeLog)(`milestoneName: ${this.milestoneName}`);
(0, utils_1.safeLog)(`milestoneId: ${this.milestoneId}`);
(0, utils_1.safeLog)(`ignoreLabels: ${this.ignoreLabels}`);
(0, utils_1.safeLog)(`ignoreMilestoneNames: ${this.ignoreMilestoneNames}`);
(0, utils_1.safeLog)(`ignoreMilestoneIds: ${this.ignoreMilestoneIds}`);
(0, utils_1.safeLog)(`minimumVotes: ${this.minimumVotes}`);
(0, utils_1.safeLog)(`maximumVotes: ${this.maximumVotes}`);
(0, utils_1.safeLog)(`involves: ${this.involves}`);
// Both milestone name and milestone Id must be provided and must match.
// The name is used to construct the query, which does not accept ID.
// The ID is used for comparisons with issue data, which does not include the name.
// TODO: Figure out a way to convert either from milestone name to ID, or vice versa.
// If label inclusion and exclusion are mixed, exclusion will take precedence.
// For example, an issue with both labels A and B will not match if B is excluded, even if A is included.
// If a milestoneName/milestoneId are set, ignoreMilenameName/ignoreMilestoneIds are ignored.
// GitHub does not appear to support searching for all issues with milestones (not lacking a milestone). "-no:milestone" does not work.
// GitHub does not appear to support searching for all issues with labels (not lacking a label). "-no:label" does not work.
// All indicated labels must be present
if (this.labels) {
if (((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) > 2 && ((_b = this.labels) === null || _b === void 0 ? void 0 : _b.startsWith('"')) && ((_c = this.labels) === null || _c === void 0 ? void 0 : _c.endsWith('"'))) {
this.labels = this.labels.substring(1, this.labels.length - 2);
}
this.labelsSet = (_d = this.labels) === null || _d === void 0 ? void 0 : _d.split(',');
for (const str of this.labelsSet) {
if (str != "") {
query = query.concat(` label:"${str}"`);
}
}
}
// The "involves" qualifier to find issues that in some way involve a certain user.
// It is a logical OR between the author, assignee, and mentions.
if (this.involves) {
this.involvesSet = (_e = this.involves) === null || _e === void 0 ? void 0 : _e.split(',');
for (const str of this.involvesSet) {
if (str != "") {
query = query.concat(` involves:"${str}"`);
}
}
}
if (this.ignoreLabels) {
if (this.ignoreLabels == "*" && !this.labels) { // only if unlabeled
query = query.concat(` no:label`);
this.ignoreAllWithLabels = true;
}
else {
this.ignoreLabelsSet = (_f = this.ignoreLabels) === null || _f === void 0 ? void 0 : _f.split(',');
for (const str of this.ignoreLabelsSet) {
if (str != "") {
query = query.concat(` -label:"${str}"`);
}
}
}
}
if (this.milestoneName) {
query = query.concat(` milestone:"${this.milestoneName}"`);
}
else if (this.ignoreMilestoneNames) {
if (this.ignoreMilestoneNames == "*") {
query = query.concat(` no:milestone`);
this.ignoreAllWithMilestones = true;
}
else if (this.ignoreMilestoneIds) {
this.ignoreMilestoneNamesSet = this.ignoreMilestoneNames.split(',');
this.ignoreMilestoneIdsSet = this.ignoreMilestoneIds.split(',');
for (const str of this.ignoreMilestoneNamesSet) {
if (str != "") {
query = query.concat(` -milestone:"${str}"`);
}
}
}
}
return query;
}
// This is necessary because GitHub sometimes returns incorrect results,
// and because issues may get modified while we are processing them.
validateIssue(issue) {
var _a, _b;
if (this.ignoreAllWithLabels) {
// Validate that the issue does not have labels
if (issue.labels && issue.labels.length !== 0) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to label found after querying for no:label.`);
return false;
}
}
else {
// Make sure all labels we wanted are present.
if ((!issue.labels || issue.labels.length == 0) && this.labelsSet.length > 0) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set. No labels found.`);
return false;
}
for (const str of this.labelsSet) {
if (!issue.labels.includes(str)) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set.`);
return false;
}
}
// Make sure no labels we wanted to ignore are present.
if (issue.labels && issue.labels.length > 0) {
for (const str of this.ignoreLabelsSet) {
if (issue.labels.includes(str)) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having an ignore label set: ${str}`);
return false;
}
}
}
}
if (this.ignoreAllWithMilestones) {
// Validate that the issue does not have a milestone.
if (issue.milestone) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone found after querying for no:milestone.`);
return false;
}
}
else {
// Make sure milestone is present, if required.
if (this.milestoneId != null && ((_a = issue.milestone) === null || _a === void 0 ? void 0 : _a.milestoneId) != +this.milestoneId) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having required milsetone id ${this.milestoneId}. Had: ${(_b = issue.milestone) === null || _b === void 0 ? void 0 : _b.milestoneId}`);
return false;
}
// Make sure a milestones we wanted to ignore is not present.
if (issue.milestone && issue.milestone.milestoneId != null) {
for (const str of this.ignoreMilestoneIdsSet) {
if (issue.milestone.milestoneId == +str) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone ${issue.milestone.milestoneId} found in list of ignored milestone IDs.`);
return false;
}
}
}
}
// Verify the issue has a sufficient number of upvotes
let upvotes = 0;
if (issue.reactions) {
upvotes = issue.reactions['+1'];
}
if (this.minimumVotes != undefined) {
if (upvotes < this.minimumVotes) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having at least ${this.minimumVotes} upvotes. Had: ${upvotes}`);
return false;
}
}
// Verify the issue does not have too many upvotes
if (this.maximumVotes != undefined) {
if (upvotes > this.maximumVotes) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having more than ${this.maximumVotes} upvotes. Had: ${upvotes}`);
return false;
}
}
return true;
}
}
exports.ActionBase = ActionBase;
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionBase = void 0;
const utils_1 = require("./utils");
class ActionBase {
constructor(labels, milestoneName, milestoneId, ignoreLabels, ignoreMilestoneNames, ignoreMilestoneIds, minimumVotes, maximumVotes, involves) {
this.labels = labels;
this.milestoneName = milestoneName;
this.milestoneId = milestoneId;
this.ignoreLabels = ignoreLabels;
this.ignoreMilestoneNames = ignoreMilestoneNames;
this.ignoreMilestoneIds = ignoreMilestoneIds;
this.minimumVotes = minimumVotes;
this.maximumVotes = maximumVotes;
this.involves = involves;
this.labelsSet = [];
this.ignoreLabelsSet = [];
this.ignoreMilestoneNamesSet = [];
this.ignoreMilestoneIdsSet = [];
this.ignoreAllWithLabels = false;
this.ignoreAllWithMilestones = false;
this.involvesSet = [];
}
buildQuery(baseQuery) {
var _a, _b, _c, _d, _e, _f;
let query = baseQuery;
(0, utils_1.safeLog)(`labels: ${this.labels}`);
(0, utils_1.safeLog)(`milestoneName: ${this.milestoneName}`);
(0, utils_1.safeLog)(`milestoneId: ${this.milestoneId}`);
(0, utils_1.safeLog)(`ignoreLabels: ${this.ignoreLabels}`);
(0, utils_1.safeLog)(`ignoreMilestoneNames: ${this.ignoreMilestoneNames}`);
(0, utils_1.safeLog)(`ignoreMilestoneIds: ${this.ignoreMilestoneIds}`);
(0, utils_1.safeLog)(`minimumVotes: ${this.minimumVotes}`);
(0, utils_1.safeLog)(`maximumVotes: ${this.maximumVotes}`);
(0, utils_1.safeLog)(`involves: ${this.involves}`);
// Both milestone name and milestone Id must be provided and must match.
// The name is used to construct the query, which does not accept ID.
// The ID is used for comparisons with issue data, which does not include the name.
// TODO: Figure out a way to convert either from milestone name to ID, or vice versa.
// If label inclusion and exclusion are mixed, exclusion will take precedence.
// For example, an issue with both labels A and B will not match if B is excluded, even if A is included.
// If a milestoneName/milestoneId are set, ignoreMilenameName/ignoreMilestoneIds are ignored.
// GitHub does not appear to support searching for all issues with milestones (not lacking a milestone). "-no:milestone" does not work.
// GitHub does not appear to support searching for all issues with labels (not lacking a label). "-no:label" does not work.
// All indicated labels must be present
if (this.labels) {
if (((_a = this.labels) === null || _a === void 0 ? void 0 : _a.length) > 2 && ((_b = this.labels) === null || _b === void 0 ? void 0 : _b.startsWith('"')) && ((_c = this.labels) === null || _c === void 0 ? void 0 : _c.endsWith('"'))) {
this.labels = this.labels.substring(1, this.labels.length - 2);
}
this.labelsSet = (_d = this.labels) === null || _d === void 0 ? void 0 : _d.split(',');
for (const str of this.labelsSet) {
if (str != "") {
query = query.concat(` label:"${str}"`);
}
}
}
// The "involves" qualifier to find issues that in some way involve a certain user.
// It is a logical OR between the author, assignee, and mentions.
if (this.involves) {
this.involvesSet = (_e = this.involves) === null || _e === void 0 ? void 0 : _e.split(',');
for (const str of this.involvesSet) {
if (str != "") {
query = query.concat(` involves:"${str}"`);
}
}
}
if (this.ignoreLabels) {
if (this.ignoreLabels == "*" && !this.labels) { // only if unlabeled
query = query.concat(` no:label`);
this.ignoreAllWithLabels = true;
}
else {
this.ignoreLabelsSet = (_f = this.ignoreLabels) === null || _f === void 0 ? void 0 : _f.split(',');
for (const str of this.ignoreLabelsSet) {
if (str != "") {
query = query.concat(` -label:"${str}"`);
}
}
}
}
if (this.milestoneName) {
query = query.concat(` milestone:"${this.milestoneName}"`);
}
else if (this.ignoreMilestoneNames) {
if (this.ignoreMilestoneNames == "*") {
query = query.concat(` no:milestone`);
this.ignoreAllWithMilestones = true;
}
else if (this.ignoreMilestoneIds) {
this.ignoreMilestoneNamesSet = this.ignoreMilestoneNames.split(',');
this.ignoreMilestoneIdsSet = this.ignoreMilestoneIds.split(',');
for (const str of this.ignoreMilestoneNamesSet) {
if (str != "") {
query = query.concat(` -milestone:"${str}"`);
}
}
}
}
return query;
}
// This is necessary because GitHub sometimes returns incorrect results,
// and because issues may get modified while we are processing them.
validateIssue(issue) {
var _a, _b;
if (this.ignoreAllWithLabels) {
// Validate that the issue does not have labels
if (issue.labels && issue.labels.length !== 0) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to label found after querying for no:label.`);
return false;
}
}
else {
// Make sure all labels we wanted are present.
if ((!issue.labels || issue.labels.length == 0) && this.labelsSet.length > 0) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set. No labels found.`);
return false;
}
for (const str of this.labelsSet) {
if (!issue.labels.includes(str)) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having a required label set.`);
return false;
}
}
// Make sure no labels we wanted to ignore are present.
if (issue.labels && issue.labels.length > 0) {
for (const str of this.ignoreLabelsSet) {
if (issue.labels.includes(str)) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having an ignore label set: ${str}`);
return false;
}
}
}
}
if (this.ignoreAllWithMilestones) {
// Validate that the issue does not have a milestone.
if (issue.milestone) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone found after querying for no:milestone.`);
return false;
}
}
else {
// Make sure milestone is present, if required.
if (this.milestoneId != null && ((_a = issue.milestone) === null || _a === void 0 ? void 0 : _a.milestoneId) != +this.milestoneId) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having required milsetone id ${this.milestoneId}. Had: ${(_b = issue.milestone) === null || _b === void 0 ? void 0 : _b.milestoneId}`);
return false;
}
// Make sure a milestones we wanted to ignore is not present.
if (issue.milestone && issue.milestone.milestoneId != null) {
for (const str of this.ignoreMilestoneIdsSet) {
if (issue.milestone.milestoneId == +str) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to milestone ${issue.milestone.milestoneId} found in list of ignored milestone IDs.`);
return false;
}
}
}
}
// Verify the issue has a sufficient number of upvotes
let upvotes = 0;
if (issue.reactions) {
upvotes = issue.reactions['+1'];
}
if (this.minimumVotes != undefined) {
if (upvotes < this.minimumVotes) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to not having at least ${this.minimumVotes} upvotes. Had: ${upvotes}`);
return false;
}
}
// Verify the issue does not have too many upvotes
if (this.maximumVotes != undefined) {
if (upvotes > this.maximumVotes) {
(0, utils_1.safeLog)(`Issue ${issue.number} skipped due to having more than ${this.maximumVotes} upvotes. Had: ${upvotes}`);
return false;
}
}
return true;
}
}
exports.ActionBase = ActionBase;
//# sourceMappingURL=ActionBase.js.map
+1963 -3081
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -13,9 +13,9 @@
"@actions/core": "^1.9.1",
"@actions/github": "^5.0.3",
"@octokit/rest": "^19.0.3",
"@slack/web-api": "^6.7.2",
"@slack/web-api": "^6.9.1",
"applicationinsights": "^2.5.1",
"axios": "^0.27.2",
"axios": "^1.6.8",
"uuid": "^8.3.2"
},
"devDependencies": {
@@ -32,7 +32,7 @@
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"mocha": "^10.0.0",
"mongodb": "^4.8.1",
"mongodb": "^4.17.0",
"nock": "^13.2.9",
"prettier": "2.7.1",
"ts-node": "^10.9.1",
+28
View File
@@ -0,0 +1,28 @@
name: Bug - debugger
on:
schedule:
- cron: 50 12 * * * # Run at 12:50 PM UTC (4:50 AM PST, 5:50 AM PDT)
workflow_dispatch:
inputs:
readonly:
description: "readonly: Specify true or 1 to prevent changes from being commited to GitHub"
default: false
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
- name: Install Actions
run: cd ./.github/actions && npm install --production && cd ../..
- name: Add Comment
uses: ./.github/actions/AddComment
with:
readonly: ${{ github.event.inputs.readonly }}
labels: bug,debugger
ignoreLabels: "investigate: costing,investigate,external,by design,question,more info needed,language service,internal"
createdAfter: "2024-07-22"
addComment: "Thank you for reporting this issue. Well let you know if we need more information to investigate it. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated."
@@ -1,7 +1,7 @@
name: By Design closer - debugger
on:
schedule:
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
- cron: 0 13 * * * # Run at 1:00 PM UTC (5:00 AM PST, 6:00 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v3
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v3
+14 -47
View File
@@ -1,47 +1,14 @@
name: CI (Linux)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: yarn install
working-directory: Extension
- name: Compile Sources
run: yarn run compile
working-directory: Extension
- name: Run Linter
run: yarn run lint
working-directory: Extension
- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension
- name: Run unit tests
uses: GabrielBB/[email protected]
with:
run: yarn run unitTests
working-directory: Extension
# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Linux)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: ubuntu-22.04
platform: linux
+15 -47
View File
@@ -1,47 +1,15 @@
name: CI (Mac)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: yarn install --network-timeout 100000
working-directory: Extension
- name: Compile Sources
run: yarn run compile
working-directory: Extension
- name: Run Linter
run: yarn run lint
working-directory: Extension
- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension
- name: Run unit tests
uses: GabrielBB/[email protected]
with:
run: yarn run unitTests
working-directory: Extension
# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Mac)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: macos-12
platform: mac
yarn-args: --network-timeout 100000
+14 -43
View File
@@ -1,43 +1,14 @@
name: CI (Windows)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: yarn install
working-directory: Extension
- name: Compile Sources
run: yarn run compile
working-directory: Extension
- name: Run Linter
run: yarn run lint
working-directory: Extension
- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension
- name: Run unit tests
run: yarn run unitTests
working-directory: Extension
# - name: Run languageServer integration tests
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Windows)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: windows-2022
platform: windows
+93
View File
@@ -0,0 +1,93 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "main", "insiders", "release", "vs" ]
pull_request:
branches: [ "main", "insiders", "release", "vs" ]
schedule:
- cron: '29 4 * * 3'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: Enhancement Closer (no milestone)
on:
schedule:
- cron: 50 11 * * * # Run at 11:50 AM UTC (3:50 AM PST, 4:50 AM PDT)
- cron: 40 12 * * * # Run at 12:40 PM UTC (4:40 AM PST, 5:40 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: Enhancement Closer (Triage)
on:
schedule:
- cron: 40 11 * * * # Run at 11:40 AM UTC (3:40 AM PST, 4:40 AM PDT)
- cron: 30 12 * * * # Run at 12:30 PM UTC (4:30 AM PST, 5:30 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+3 -1
View File
@@ -1,7 +1,7 @@
name: Enhancement Reopener
on:
schedule:
- cron: 20 12 * * * # Run at 12:20 PM UTC (4:20 AM PST, 5:20 AM PDT)
- cron: 0 11 * * * # Run at 11:00 AM UTC (3:00 AM PST, 4:00 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: External closer - debugger
on:
schedule:
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
- cron: 10 13 * * * # Run at 1:10 PM UTC (5:10 AM PST, 6:10 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -0,0 +1,28 @@
name: Feature Request - debugger
on:
schedule:
- cron: 20 13 * * * # Run at 1:20 PM UTC (5:20 AM PST, 6:20 AM PDT)
workflow_dispatch:
inputs:
readonly:
description: "readonly: Specify true or 1 to prevent changes from being commited to GitHub"
default: false
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
- name: Install Actions
run: cd ./.github/actions && npm install --production && cd ../..
- name: Add Comment
uses: ./.github/actions/AddComment
with:
readonly: ${{ github.event.inputs.readonly }}
labels: feature request,debugger
ignoreLabels: "investigate: costing,investigate,external,by design,question,more info needed,language service,internal"
createdAfter: "2024-07-22"
addComment: "Thank you for your feature request. While we may not be able to implement it immediately, we will monitor community reactions to see how it fits into our backlog. Additionally, if you're working with GDB/LLDB, please note that the code is open source at https://github.com/microsoft/MIEngine/wiki/Contributing-Code . Your contributions are always welcome and appreciated."
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: Investigate closer - debugger
on:
schedule:
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
- cron: 30 13 * * * # Run at 1:30 PM UTC (5:30 AM PST, 6:30 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: Investigate Costing closer - debugger
on:
schedule:
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
- cron: 40 13 * * * # Run at 1:40 PM UTC (5:40 AM PST, 6:40 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -0,0 +1,73 @@
# Reuable workflow for compiling and testing extension.
name: Compile and test extension
on:
workflow_call:
inputs:
runner-env:
required: true
type: string
platform:
# Expects 'mac', 'linux', or 'windows'
required: true
type: string
yarn-args:
type: string
jobs:
build:
runs-on: ${{ inputs.runner-env }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: yarn install ${{ inputs.yarn-args }}
working-directory: Extension
- name: Compile Sources
run: yarn run compile
working-directory: Extension
- name: Run Linter
run: yarn run lint
working-directory: Extension
- name: Run unit tests
run: yarn test
working-directory: Extension
# NOTE : We can't run the test that require the native binary files
# yet -- there will be an update soon that allows the tester to
# acquire them on-the-fly
# - name: Run languageServer integration tests
# if: ${{ inputs.platform == 'windows' }}
# run: yarn test --scenario=SingleRootProject
# working-directory: Extension
# - name: Run E2E IntelliSense features tests
# if: ${{ inputs.platform == 'windows' }}
# run: yarn test --scenario=MultirootDeadlockTest
# working-directory: Extension
# NOTE: For mac/linux run the tests with xvfb-action for UI support.
# Another way to start xvfb https://github.com/microsoft/vscode-test/blob/master/sample/azure-pipelines.yml
# - name: Run languageServer integration tests (xvfb)
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
# uses: coactions/setup-xvfb@v1
# with:
# run: yarn test --scenario=SingleRootProject
# working-directory: Extension
# - name: Run E2E IntelliSense features tests (xvfb)
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
# uses: coactions/setup-xvfb@v1
# with:
# run: yarn test --scenario=MultirootDeadlockTest
# working-directory: Extension
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -1,7 +1,7 @@
name: More Info Needed Closer - debugger
on:
schedule:
- cron: 10 11 * * * # Run at 11:10 AM UTC (3:10 AM PST, 4:10 AM PDT)
- cron: 50 13 * * * # Run at 1:50 PM UTC (5:50 AM PST, 6:50 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -22,7 +24,7 @@ jobs:
readonly: ${{ github.event.inputs.readonly }}
labels: more info needed
ignoreLabels: debugger,internal
closeDays: 60
closeDays: 30
closeComment: "This issue has been closed because it needs more information and has not had recent activity."
pingDays: 80
pingDays: 14
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
@@ -1,7 +1,7 @@
name: Question Closer - debugger
on:
schedule:
- cron: 20 11 * * * # Run at 11:20 AM UTC (3:20 AM PST, 4:20 AM PDT)
- cron: 0 14 * * * # Run at 2:00 PM UTC (6:00 AM PST, 7:00 AM PDT)
workflow_dispatch:
inputs:
readonly:
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+117
View File
@@ -0,0 +1,117 @@
name: $(date:yyyyMMdd)$(rev:.r)
trigger:
branches:
include:
- main
- release
schedules:
- cron: 30 5 * * 0
branches:
include:
- main
always: true
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
variables:
- name: Codeql.Enabled
value: true
- name: Codeql.Language
value: javascript
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
tsa:
enabled: true
config:
tsaVersion: TsaV2
codebase: NewOrUpdate
codebaseName: vscode-cpptools
tsaStamp: $(TsaProjectName)
tsaEnvironment: PROD
notificationAliases: $(TsaNotificationAlias)
codebaseAdmins: $(TsaCodebaseAdmins)
instanceUrl: $(TsaInstanceUrl)
projectName: $(TsaProjectName)
areaPath: $(TsaAreaPath)
iterationPath: $(TsaIterationPath)
alltools: true
repositoryName: vscode-cpptools
policheck:
enabled: true
featureFlags:
autoBaseline: false
stages:
- stage: build
jobs:
- job: Phase_1
displayName: Build cpptools.vsix
timeoutInMinutes: 60
cancelTimeoutInMinutes: 1
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'cpptools.vsix'
condition: succeeded()
targetPath: $(Build.ArtifactStagingDirectory)\Extension
artifactName: cpptools.vsix
steps:
- checkout: self
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: Use Yarn 1.x
- task: UseNode@1
displayName: Use Node 18.x
inputs:
version: 18.x
- task: CmdLine@2
displayName: Delete .npmrc if it exists
inputs:
script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
- task: Npm@0
name: NpmInstall_2
displayName: Install vsce
inputs:
arguments: --global @vscode/vsce
- task: CmdLine@1
name: ProcessRunner_11
displayName: Create Extension Staging Directory
inputs:
filename: mkdir
arguments: $(Build.ArtifactStagingDirectory)\Extension
- task: CmdLine@1
name: ProcessRunner_12
displayName: Run VSCE to package vsix
inputs:
filename: vsce
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
workingFolder: $(Build.SourcesDirectory)\Extension
- task: Npm@0
displayName: Uninstall vsce
inputs:
command: uninstall
arguments: --global @vscode/vsce
+67 -37
View File
@@ -2,11 +2,14 @@
# Pipeline for VsCodeExtension-Localization build definition
# Runs OneLocBuild task to localize xlf file
# ==================================================================================
resources:
repositories:
- repository: self
clean: true
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
trigger: none
pr: none
@@ -18,45 +21,72 @@ schedules:
- main
always: true
pool:
name: 'AzurePipelines-EO'
demands:
- ImageOverride -equals AzurePipelinesWindows2022compliant
variables:
TeamName: cpptools
Codeql.Language: javascript
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
stages:
- stage: stage
jobs:
- job: job
templateContext:
outputs:
- output: pipelineArtifact
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
publishLocation: 'Container'
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: 'Install Node.js'
- task: CmdLine@2
inputs:
script: 'cd Extension && yarn install'
- task: CmdLine@2
inputs:
script: 'cd Extension && yarn install'
- task: CmdLine@2
inputs:
script: 'cd ./Extension && yarn run translations-export && cd ..'
- task: CmdLine@2
inputs:
script: 'cd ./Extension && yarn run translations-export && cd ..'
- task: OneLocBuild@2
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: 'Build/loc/LocProject.json'
outDir: '$(Build.ArtifactStagingDirectory)'
isCreatePrSelected: false
prSourceBranchPrefix: 'locfiles'
packageSourceAuth: 'patAuth'
patVariable: '$(OneLocBuildPat)'
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-VCPP'
lsBuildXLocPackageVersion: '7.0.30510'
# Requires Azure client 2.x
- task: AzureCLI@2
displayName: 'Set OneLocBuildToken'
enabled: true
inputs:
azureSubscription: '$(AzureSubscription)' # Azure DevOps service connection
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
$token = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
- task: CmdLine@2
inputs:
script: 'cd Extension && node ./translations_auto_pr.js microsoft vscode-cpptools csigs $(csigsPat) csigs [email protected] "$(Build.ArtifactStagingDirectory)/loc" vscode-extensions-localization-export/vscode-extensions && cd ..'
- task: OneLocBuild@2
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: 'Build/loc/LocProject.json'
outDir: '$(Build.ArtifactStagingDirectory)'
isCreatePrSelected: false
prSourceBranchPrefix: 'locfiles'
packageSourceAuth: 'patAuth'
patVariable: '$(AzDO.OneLocBuildToken)'
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-VCPP'
lsBuildXLocPackageVersion: '7.0.30510'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: CmdLine@2
inputs:
script: 'cd Extension && node ./translations_auto_pr.js microsoft vscode-cpptools csigs $(csigsPat) csigs [email protected] "$(Build.ArtifactStagingDirectory)/loc" vscode-extensions-localization-export/vscode-extensions && cd ..'
+48
View File
@@ -0,0 +1,48 @@
name: $(date:yyyyMMdd)$(rev:.r)
trigger: none
pr: none
parameters:
- name: verifyVersion
displayName: Attest version in package.json is correct
type: boolean
default: false
- name: verifyReadme
displayName: Attest README.md is updated
type: boolean
default: false
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
stages:
- stage: package
jobs:
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set
- ${{ if not(eq(parameters.verifyVersion, true)) }}:
- 'The version in package.json should be updated before scheduling the pipeline.'
- ${{ if not(eq(parameters.verifyReadme, true)) }}:
- 'README.md should be updated before scheduling the pipeline.'
- template: /Build/package/jobs_package_vsix.yml@self
parameters:
vsixName: cpptools-extension-pack.vsix
srcDir: ExtensionPack
+48
View File
@@ -0,0 +1,48 @@
name: $(date:yyyyMMdd)$(rev:.r)
trigger: none
pr: none
parameters:
- name: verifyVersion
displayName: Attest version in package.json is correct
type: boolean
default: false
- name: verifyReadme
displayName: Attest README.md is updated
type: boolean
default: false
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
stages:
- stage: package
jobs:
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set
- ${{ if not(eq(parameters.verifyVersion, true)) }}:
- 'The version in package.json should be updated before scheduling the pipeline.'
- ${{ if not(eq(parameters.verifyReadme, true)) }}:
- 'README.md should be updated before scheduling the pipeline.'
- template: /Build/package/jobs_package_vsix.yml@self
parameters:
vsixName: cpptools-themes.vsix
srcDir: Themes
+54
View File
@@ -0,0 +1,54 @@
parameters:
- name: vsixName
type: string
default: ''
- name: srcDir
type: string
default: ''
jobs:
- job: package
displayName: Build ${{ parameters.vsixName }}
timeoutInMinutes: 30
cancelTimeoutInMinutes: 1
templateContext:
outputs:
- output: pipelineArtifact
displayName: '${{ parameters.vsixName }}'
targetPath: $(Build.ArtifactStagingDirectory)\vsix
artifactName: vsix
steps:
- checkout: self
- task: UseNode@1
displayName: Use Node 18.x
inputs:
version: 18.x
- task: Npm@0
displayName: Install vsce
inputs:
arguments: --global @vscode/vsce
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: Use Yarn 1.x
- task: CmdLine@1
displayName: Create Staging Directory
inputs:
filename: mkdir
arguments: $(Build.ArtifactStagingDirectory)\vsix
- task: CmdLine@1
displayName: Run VSCE to package vsix
inputs:
filename: vsce
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }}
workingFolder: $(Build.SourcesDirectory)\${{ parameters.srcDir }}
- task: Npm@0
displayName: Uninstall vsce
inputs:
command: uninstall
arguments: --global @vscode/vsce
+43
View File
@@ -0,0 +1,43 @@
name: $(Date:yyyyMMdd)$(rev:.r)
trigger: none
pr: none
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
pipelines:
- pipeline: vsixBuild
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-extension-pack'
trigger: true
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
stages:
- stage: Validate
jobs:
- template: /Build/publish/jobs_manual_validation.yml@self
parameters:
notifyUsers: $(NotifyUsers)
releaseBuildUrl: $(ReleaseBuildUrl)
- stage: Release
dependsOn: Validate
jobs:
- template: /Build/publish/jobs_publish_vsix.yml@self
parameters:
vsixName: cpptools-extension-pack.vsix
+43
View File
@@ -0,0 +1,43 @@
name: $(Date:yyyyMMdd)$(rev:.r)
trigger: none
pr: none
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
pipelines:
- pipeline: vsixBuild
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-themes'
trigger: true
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
stages:
- stage: Validate
jobs:
- template: /Build/publish/jobs_manual_validation.yml@self
parameters:
notifyUsers: $(NotifyUsers)
releaseBuildUrl: $(ReleaseBuildUrl)
- stage: Release
dependsOn: Validate
jobs:
- template: /Build/publish/jobs_publish_vsix.yml@self
parameters:
vsixName: cpptools-themes.vsix
+19
View File
@@ -0,0 +1,19 @@
parameters:
- name: notifyUsers
type: string
default: ''
- name: releaseBuildUrl
type: string
default: ''
jobs:
- job: WaitForValidation
displayName: Wait for VSIX validation
pool: server
steps:
- task: ManualValidation@0
displayName: "Manual Validation"
inputs:
notifyUsers: $(notifyUsers)
instructions: |
Download and test the vsix from the latest release build: $(releaseBuildUrl)
+44
View File
@@ -0,0 +1,44 @@
parameters:
- name: vsixName
type: string
default: ''
jobs:
- job: Publish
displayName: Publish to Marketplace
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: vsixBuild
artifactName: vsix
targetPath: $(Build.StagingDirectory)\vsix
steps:
- task: NodeTool@0
displayName: Use Node 18.x
inputs:
versionSpec: 18.x
- task: Npm@0
displayName: Install vsce
inputs:
arguments: --global @vscode/vsce
- task: AzureCLI@2
displayName: Generate AAD_TOKEN
inputs:
azureSubscription: $(AzureSubscription)
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken"
- script: |
vsce publish --packagePath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }}
displayName: Publish to Marketplace
env:
VSCE_PAT: $(AAD_TOKEN)
+2 -1
View File
@@ -6,4 +6,5 @@ Resources:
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)
+15
View File
@@ -33,3 +33,18 @@ const localize: nls.LocalizeFunc = nls.loadMessageBundle();
const readmeMessage: string = localize("refer.read.me", "Please refer to {0} for troubleshooting information. Issues can be created at {1}", readmePath, "https://github.com/Microsoft/vscode-cpptools/issues");
```
* The first parameter to localize should be a unique key for that string, not used by any other call to localize() in the file unless representing the same string. The second parameter is the string to localize. Both of these parameters must be string literals. Tokens such as {0} and {1} are supported in the localizable string, with replacement values passed as additional parameters to localize().
## Contributor License Agreement
This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
+3 -3
View File
@@ -1,4 +1,4 @@
*.js
test/**/index.ts
test/**/runTest.ts
tools/prepublish.js
dist/
vscode*.d.ts
+60 -50
View File
@@ -1,4 +1,9 @@
module.exports = {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/strict",
],
"env": {
"browser": true,
"es6": true,
@@ -6,17 +11,30 @@ module.exports = {
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
"project": ["tsconfig.json", ".scripts/tsconfig.json"],
"ecmaVersion": 2022,
"sourceType": "module",
"warnOnUnsupportedTypeScriptVersion": false,
},
"plugins": [
"@typescript-eslint",
"@typescript-eslint/tslint",
"eslint-plugin-jsdoc",
"@typescript-eslint/eslint-plugin-tslint",
"@typescript-eslint/eslint-plugin",
"eslint-plugin-import",
"eslint-plugin-header"
],
"rules": {
"indent": [
"warn",
4,
{
"SwitchCase": 1,
"ObjectExpression": "first"
}
],
"@typescript-eslint/indent": [
"error", 4
],
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
@@ -41,6 +59,17 @@ module.exports = {
}
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "off",
"no-case-declarations": "off",
"no-useless-escape": "off",
"no-floating-decimal": "error",
"keyword-spacing": ["error", { "before": true, "overrides": { "this": { "before": false } } }],
"arrow-spacing": ["error", { "before": true, "after": true }],
"semi-spacing": ["error", { "before": false, "after": true }],
"no-extra-parens": ["error", "all", { "nestedBinaryExpressions": false, "ternaryOperandBinaryExpressions": false }],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
@@ -57,8 +86,16 @@ module.exports = {
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/space-infix-ops": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"arrow-body-style": "error",
"comma-dangle": "error",
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": "error",
"constructor-super": "error",
"curly": "error",
"eol-last": "error",
@@ -80,17 +117,19 @@ module.exports = {
"no-fallthrough": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"rest-spread-spacing": ["error", "never"],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-sparse-arrays": "error",
"no-trailing-spaces": "error",
"no-multi-spaces": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"space-before-blocks": "error",
"no-var": "error",
"one-var": [
"error",
@@ -103,54 +142,25 @@ module.exports = {
"never"
],
"spaced-comment": [
"error",
"always"
"off",
"always",
{ "line": { "exceptions": ["/"] } } // triple slash directives
],
"use-isnan": "error",
"valid-typeof": "error",
"yoda": "error",
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"encoding": true,
"file-header": [
true,
".*"
],
"import-spacing": true,
"match-default-export-name": true,
"no-boolean-literal-compare": true,
"no-mergeable-namespace": true,
"no-reference-import": true,
"no-unnecessary-callback-wrapper": true,
"number-literal-format": true,
"one-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace",
"check-whitespace"
],
"prefer-method-signature": true,
"prefer-while": true,
"typedef": [
true,
"variable-declaration",
"call-signature",
"variable-declaration-ignore-function"
],
"whitespace": [
true,
"check-branch",
"check-operator",
"check-separator",
"check-preblock",
"check-type"
]
}
}
]
"space-infix-ops": "error",
"header/header": [
"warn",
"block",
[
" --------------------------------------------------------------------------------------------",
" * Copyright (c) Microsoft Corporation. All Rights Reserved.",
" * See 'LICENSE' in the project root for license information.",
" * ------------------------------------------------------------------------------------------ "
],
],
}
};
+1
View File
@@ -34,3 +34,4 @@ localized_string_ids.h
src/nativeStrings.ts
vscode*.d.ts
.scripts/_*
+64
View File
@@ -0,0 +1,64 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { error } from 'node:console';
import { resolve, sep } from 'node:path';
import { filepath } from '../src/Utility/Filesystem/filepath';
import { verbose } from '../src/Utility/Text/streams';
import { $root, Git, brightGreen, cyan, getModifiedIgnoredFiles, rimraf } from './common';
// notes:
// list all gitignore'd files that are modified: `git clean -Xd -n`
// list all untracked and ignored files that are modified/created: `git clean -Xd -n`
export async function main() {
await rimraf(resolve($root, 'dist'));
}
export async function all() {
await rimraf(...(await getModifiedIgnoredFiles()).filter(each => !each.includes('node_modules')));
}
export async function reset() {
verbose(`Resetting all .gitignored files in extension`);
await rimraf(...await getModifiedIgnoredFiles());
}
async function details(files: string[]) {
let all = await Promise.all(files.filter(each => each).map(async (each) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [filename, stats ] = await filepath.stats(each);
return {
filename: stats.isDirectory() ? cyan(`${each}${sep}**`) : brightGreen(`${each}`),
date: stats.mtime.toLocaleDateString().replace(/\b(\d)\//g, '0$1\/'),
time: stats.mtime.toLocaleTimeString().replace(/^(\d)\:/g, '0$1:'),
modified: stats.mtime
};
}));
all = all.sort((a, b) => a.modified.getTime() - b.modified.getTime());
// print a formatted table so the date and time are aligned
const max = all.reduce((max, each) => Math.max(max, each.filename.length), 0);
all.forEach(each => console.log(` ${each.filename.padEnd(max)} [${each.date} ${each.time}]`));
console.log('');
}
export async function show(opt?: string) {
switch (opt?.toLowerCase()) {
case 'new':
console.log(cyan('\n\nNew files:'));
const r = await Git('ls-files', '--others', '--exclude-standard', '-z');
return details(r.stdio.all().map(each => resolve(each.trim().replace(/\0/g, ''))));
case undefined:
case '':
case 'ignored':
case 'untracked':
console.log(cyan('\n\nUntracked+Ignored files:'));
return details(await getModifiedIgnoredFiles());
default:
return error(`Unknown option '${opt}'`);
}
}
+42
View File
@@ -0,0 +1,42 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { spawnSync } from 'child_process';
import { verbose } from '../src/Utility/Text/streams';
import { $args, $root, $scenario, assertAnyFile, brightGreen, gray, green, pwd } from './common';
import { resolve } from 'path';
import { getTestInfo } from '../test/common/selectTests';
import { install, options } from "./vscode";
export { install, reset } from './vscode';
export async function main() {
let ti = await getTestInfo($scenario);
if (!ti) {
// try using the first arg as a scenario name or location
ti = await getTestInfo($args[0], $args[0] ? resolve(pwd, $args[0]) : undefined);
if (ti) {
$args[0] = ti.workspace;
}
} else {
// we found it
$args.unshift(ti.workspace);
}
await assertAnyFile('dist/src/main.js', `The extension entry point '${$root}/dist/src/main.js is missing. You should run ${brightGreen("yarn compile")}\n\n`);
const { cli, args } = await install();
// example of installing an extension into code
//verbose(`Installing release version of 'ms-vscode.cpptools'`);
//spawnSync(cli, [...args, '--install-extension', 'ms-vscode.cpptools'], { encoding: 'utf-8', stdio: 'ignore' })
verbose(green('Launch VSCode'));
const ARGS = [...args, ...options.launchArgs.filter(each => !each.startsWith('--extensions-dir=') && !each.startsWith('--user-data-dir=')), `--extensionDevelopmentPath=${$root}`, ...$args ].map(each => (each.indexOf(' ') > -1) && (each.indexOf('"') === -1) ? `"${each}"` : each);
const CLI = cli.indexOf(' ') > -1 && cli.indexOf('"') === -1 ? `"${cli}"` : cli;
verbose(gray(`${CLI}\n ${ [...ARGS ].join('\n ')}`));
spawnSync(CLI, ARGS, { encoding: 'utf-8', stdio: 'ignore', env: { ...process.env, DONT_PROMPT_WSL_INSTALL:"1" }, shell: true });
}
+343
View File
@@ -0,0 +1,343 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { Command, CommandFunction } from '../src/Utility/Process/program';
import { ok } from 'assert';
import { CommentJSONValue, parse, stringify } from 'comment-json';
import { mkdir as md, readFile, rm, writeFile } from 'fs/promises';
import { IOptions, glob as globSync } from 'glob';
import { dirname, resolve } from 'path';
import { chdir, cwd, env } from 'process';
import { setImmediate } from 'timers/promises';
import { promisify } from 'util';
import { filepath } from '../src/Utility/Filesystem/filepath';
import { is } from '../src/Utility/System/guards';
import { verbose } from '../src/Utility/Text/streams';
export const $root = resolve(`${__dirname}/..`);
export let $cmd = 'main';
export let $scenario = '';
// loop through the args and pick out --scenario=... and remove it from the $args and set $scenario
process.argv.slice(2).filter(each => !(each.startsWith('--scenario=') && ($scenario = each.substring('--scenario='.length))));
export const $args = process.argv.slice(2).filter(each => !each.startsWith('--'));
export const $switches = process.argv.slice(2).filter(each => each.startsWith('--'));
/** enqueue the call to the callback function to happen on the next available tick, and return a promise to the result */
export function then<T>(callback: () => Promise<T> | T): Promise<T> {
return setImmediate().then(callback);
}
export const pwd = env.INIT_CWD ?? cwd();
verbose(yellow(`pwd: ${pwd}`));
// ensure we're in the extension folder.
chdir($root);
// dump unhandled async errors to the console and exit.
process.on('unhandledRejection', (reason: any, _promise) => {
error(`${reason?.stack?.split(/\r?\n/).filter(l => !l.includes('node:internal') && !l.includes('node_modules')).join('\n')}`);
process.exit(1);
});
const git = new Command('git');
export const Git = async (...args: Parameters<Awaited<CommandFunction>>) => (await git)(...args);
export const GitClean = async (...args: Parameters<Awaited<CommandFunction>>) => (await new Command(await git, 'clean'))(...args);
export async function getModifiedIgnoredFiles() {
const {code, error, stdio } = await GitClean('-Xd', '-n');
if (code) {
throw new Error(`\n${error.all().join('\n')}`);
}
// return the full path of files that would be removed.
return Promise.all(stdio.filter("Would remove").map((s) => filepath.exists(s.replace(/^Would remove /, ''), $root)).filter(p => p));
}
export async function rimraf(...paths: string[]) {
const all = [];
for (const each of paths) {
if (!each) {
continue;
}
if (await filepath.isFolder(each)) {
verbose(`Removing folder ${red(each)}`);
all.push(rm(each, {recursive: true, force: true}));
continue;
}
verbose(`Removing file ${red(each)}`);
all.push(rm(each, {force: true}));
}
await Promise.all(all);
}
export async function mkdir(filePath: string) {
const [fullPath, info] = await filepath.stats(filePath, $root);
if (info) {
if (info.isDirectory()) {
return fullPath;
}
throw new Error(`Cannot create directory '${filePath}' because there is a file there.`);
}
await md(fullPath, { recursive: true });
return fullPath;
}
export const glob: (pattern: string, options?: IOptions) => Promise<string[]> = promisify(globSync);
export async function write(filePath: string, data: Buffer | string) {
await mkdir(dirname(filePath));
if (await filepath.isFile(filePath)) {
const content = await readFile(filePath);
if (is.string(data)) {
// if we're passed a text file, we should match the line endings of the existing file.
const textContent = content.toString();
// normalize the line endings to the same as the current file.
data = textContent.indexOf('\r\n') > -1 ? data.replace(/\r\n|\n/g, '\r\n') : data.replace(/\r\n|\n/g, '\n');
// if the text content is a match, we don't have to change anything
if (textContent === data) {
verbose(`Text file at '${filePath}' is up to date.`);
return;
}
} else {
// if the binary content is a match, we don't have to change anything
if (content.equals(data)) {
verbose(`File at '${filePath}' is up to date.`);
return;
}
}
}
verbose(`Writing file '${filePath}'`);
await writeFile(filePath, data);
}
export async function updateFiles(files: string[], dest: string | Promise<string>) {
const target = is.promise(dest) ? await dest : dest;
await Promise.all(files.map(async (each) => {
const sourceFile = await filepath.isFile(each, $root);
if (sourceFile) {
const targetFile = resolve(target, each);
await write(targetFile, await readFile(sourceFile));
}
}));
}
export async function go() {
if (require.main) {
// loop through the args and pick out the first non --arg and remove it from the $args and set $cmd
for (let i = 0; i < $args.length; i++) {
const each = $args[i];
if (!each.startsWith('--') && require.main.exports[each]) {
$cmd = each;
$args.splice(i, 1);
break;
}
}
verbose(`${yellow("Running task:")} ${green($cmd)} ${green($args.join(' '))}`);
require.main.exports[$cmd](...$args);
}
}
void then(go);
export async function read(filename: string) {
const content = await readFile(filename);
ok(content, `File '${filename}' has no content`);
return content.toString();
}
export async function readJson(filename: string, fallback = {}): Promise<CommentJSONValue> {
try {
return parse(await read(filename));
} catch {
return fallback as CommentJSONValue;
}
}
export async function writeJson(filename: string, object: CommentJSONValue) {
await write(filename, stringify(object, null, 4));
}
export function error(text: string) {
console.error(`\n${red('ERROR')}: ${text}`);
return true;
}
export function warn(text: string) {
console.error(`\n${yellow('WARNING')}: ${text}`);
return true;
}
export function note(text: string) {
console.error(`\n${cyan('NOTE')}: ${text}`);
}
export function underline(text: string) {
return `\u001b[4m${text}\u001b[0m`;
}
export function bold(text: string) {
return `\u001b[1m${text}\u001b[0m`;
}
export function dim(text: string) {
return `\u001b[2m${text}\u001b[0m`;
}
export function brightGreen(text: string) {
return `\u001b[38;2;19;161;14m${text}\u001b[0m`;
}
export function green(text: string) {
return `\u001b[38;2;78;154;6m${text}\u001b[0m`;
}
export function brightWhite(text: string) {
return `\u001b[38;2;238;238;236m${text}\u001b[0m`;
}
export function gray(text: string) {
return `\u001b[38;2;117;113;94m${text}\u001b[0m`;
}
export function yellow(text: string) {
return `\u001b[38;2;252;233;79m${text}\u001b[0m`;
}
export function red(text: string) {
return `\u001b[38;2;197;15;31m${text}\u001b[0m`;
}
export function cyan(text: string) {
return `\u001b[38;2;0;174;239m${text}\u001b[0m`;
}
export const hr = "===============================================================================";
export function heading(text: string, level = 1) {
switch (level) {
case 1:
return `${underline(bold(text))}`;
case 2:
return `${brightGreen(text)}`;
case 3:
return `${green(text)}`;
}
return `${bold(text)}\n`;
}
export function optional(text: string) {
return gray(text);
}
export function cmdSwitch(text: string) {
return optional(`--${text}`);
}
export function command(text: string) {
return brightWhite(bold(text));
}
export function hint(text: string) {
return green(dim(text));
}
export function count(num: number) {
return gray(`${num}`);
}
export function position(text: string) {
return gray(`${text}`);
}
export async function assertAnyFolder(oneOrMoreFolders: string | string[], errorMessage?: string): Promise<string> {
oneOrMoreFolders = is.array(oneOrMoreFolders) ? oneOrMoreFolders : [oneOrMoreFolders];
for (const each of oneOrMoreFolders) {
const result = await filepath.isFolder(each, $root);
if (result) {
verbose(`Folder ${brightGreen(each)} exists.`);
return result;
}
}
if (errorMessage) {
if (!$switches.includes('--quiet')) {
error(errorMessage);
}
process.exit(1);
}
}
export async function assertAnyFile(oneOrMoreFiles: string | string[], errorMessage?: string): Promise<string> {
oneOrMoreFiles = is.array(oneOrMoreFiles) ? oneOrMoreFiles : [oneOrMoreFiles];
for (const each of oneOrMoreFiles) {
const result = await filepath.isFile(each, $root);
if (result) {
verbose(`Folder ${brightGreen(each)} exists.`);
return result;
}
}
if (errorMessage) {
if (!$switches.includes('--quiet')) {
error(errorMessage);
}
process.exit(1);
}
}
const quiet = process.argv.includes('--quiet');
export async function checkPrep() {
let failing = false;
failing = !await assertAnyFolder('dist/test') && (quiet || warn(`The compiled test files are not in place.`)) || failing;
failing = !await assertAnyFolder('dist/walkthrough') && (quiet || warn(`The walkthrough files are not in place.`)) || failing;
failing = !await assertAnyFolder('dist/html') && (quiet || warn(`The html files are not in place.`)) || failing;
failing = !await assertAnyFolder('dist/schema') && (quiet || warn(`The schema files are not in place.`)) || failing;
failing = !await assertAnyFile('dist/nls.metadata.json') && (quiet || warn(`The extension translation file '${$root}/dist/nls.metadata.json is missing.`)) || failing;
failing = await checkDTS() || failing;
if (!failing) {
verbose('Prep files appear to be in place.');
}
return failing;
}
export async function checkCompiled() {
let failing = false;
failing = await checkDTS() || failing;
failing = !await assertAnyFile('dist/src/main.js') && (quiet || warn(`The extension entry point '${$root}/dist/src/main.js is missing.`)) || failing;
if (!failing) {
verbose('Compiled files appear to be in place.');
}
return failing;
}
export async function checkDTS() {
let failing = false;
failing = !await assertAnyFile('vscode.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.d.ts is missing.`)) || failing;
failing = !await assertAnyFile('vscode.proposed.terminalDataWriteEvent.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.terminalDataWriteEvent.d.ts is missing.`)) || failing;
if (!failing) {
verbose('VSCode d.ts files appear to be in place.');
}
return failing;
}
export async function checkBinaries() {
let failing = false;
failing = !await assertAnyFile(['bin/cpptools.exe', 'bin/cpptools']) && (quiet || warn(`The native binary files are not present. You should either build or install the native binaries\n\n.`)) || failing;
if (!failing) {
verbose('Native binary files appear to be in place.');
}
return failing;
}
+28
View File
@@ -0,0 +1,28 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { watch as watchFiles } from 'fs/promises';
import { filepath } from '../src/Utility/Filesystem/filepath';
import { verbose } from '../src/Utility/Text/streams';
import { $root, glob, mkdir, updateFiles } from './common';
export async function main() {
verbose(`Copying walkthrough media to extension/dist folder`);
await updateFiles(await glob('walkthrough/images/**/*'), mkdir('dist'));
}
export async function watch() {
const source = await filepath.isFolder('walkthrough/images', $root);
if (source) {
verbose(`Watching ${source} folder for changes.`);
console.log('Press Ctrl+C to exit.');
// eslint-disable-next-line @typescript-eslint/no-unused-vars
for await (const event of watchFiles(source, {recursive: true })) {
await main();
}
}
}
+134
View File
@@ -0,0 +1,134 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { parse } from 'comment-json';
import { resolve } from 'path';
import { read, write } from './common';
// ****************************
// Command: generate-native-strings
// The following is used to generate nativeStrings.ts and localized_string_ids.h from ./src/nativeStrings.json
// If adding localized strings to the native side, start by adding it to nativeStrings.json and use this to generate the others.
// ****************************
export async function main() {
const $root = resolve(`${__dirname}/..`);
const stringTable = parse(await read(`${$root}/src/nativeStrings.json`)) as any;
let nativeEnumContent = "";
let nativeStringTableContent = "";
let typeScriptSwitchContent = "";
let stringIndex = 1;
for (const property in stringTable) {
let stringValue = stringTable[property];
let hintValue;
if (typeof stringValue !== "string") {
hintValue = stringValue.hint;
stringValue = stringValue.text;
}
// Add to native enum
nativeEnumContent += ` ${property} = ${stringIndex},\n`;
// Add to native string table
nativeStringTableContent += ` ${JSON.stringify(stringValue)},\n`;
// Add to TypeScript switch
// Skip empty strings, which can be used to prevent enum/index reordering
if (stringValue !== "") {
// It's possible that a translation may skip "{#}" entries, so check for up to 50 of them.
let numArgs = 0;
for (let i = 0; i < 50; i++) {
if (stringValue.includes(`{${i}}`)) {
numArgs = i + 1;
}
}
typeScriptSwitchContent += ` case ${stringIndex}:\n`;
if (numArgs !== 0) {
typeScriptSwitchContent += ` if (stringArgs) {\n`;
if (hintValue) {
typeScriptSwitchContent += ` message = localize({ key: ${JSON.stringify(property)}, comment: [${JSON.stringify(hintValue)}] }, ${JSON.stringify(stringValue)}`;
} else {
typeScriptSwitchContent += ` message = localize(${JSON.stringify(property)}, ${JSON.stringify(stringValue)}`;
}
for (let i = 0; i < numArgs; i++) {
typeScriptSwitchContent += `, stringArgs[${i}]`;
}
typeScriptSwitchContent += `);\n break;\n }\n`;
}
if (hintValue) {
typeScriptSwitchContent += ` message = localize({ key: ${JSON.stringify(property)}, comment: [${JSON.stringify(hintValue)}] }, ${JSON.stringify(stringValue)}`;
} else {
typeScriptSwitchContent += ` message = localize(${JSON.stringify(property)}, ${JSON.stringify(stringValue)}`;
}
typeScriptSwitchContent += `);\n break;\n`;
}
++stringIndex;
}
// --------------------------------------------------------------------------------------------
// Generate the TypeScript file
// --------------------------------------------------------------------------------------------
const typeScriptContent = `/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
// ****** This file is generated from nativeStrings.json. Do not edit this file directly. ******
'use strict';
import * as nls from 'vscode-nls';
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export const localizedStringCount: number = ${stringIndex};
export function lookupString(stringId: number, stringArgs?: string[]): string {
let message: string = "";
switch (stringId) {
case 0:
// Special case for blank string
break;
${typeScriptSwitchContent}
default:
console.assert(\"Unrecognized string ID\");
break;
}
return message;
}
`;
// If the file isn't there, or the contents are different, write it out
await write(`${$root}/src/nativeStrings.ts`, typeScriptContent);
// --------------------------------------------------------------------------------------------
// Generate the native string header file
// --------------------------------------------------------------------------------------------
const nativeContents = `/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
// ****** This file is generated from nativeStrings.json. Do not edit this file directly. ******
#pragma once
// NOLINTBEGIN(modernize-raw-string-literal)
enum class localized_string_id : unsigned int
{
blank = 0,
${nativeEnumContent}};
inline static const char *localizable_strings[] = {
"",
${nativeStringTableContent}};
// NOLINTEND(modernize-raw-string-literal)
`;
// If the file isn't there, or the contents are different, write it out
await write(`${$root}/localized_string_ids.h`, nativeContents);
}
@@ -1,10 +1,12 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as fs from 'fs';
import * as os from 'os';
/* eslint-disable no-prototype-builtins */
import { resolve } from 'path';
import { $root, read, write } from './common';
function appendFieldsToObject(reference: any, obj: any): any {
// Make sure it is an object type
@@ -54,7 +56,7 @@ function updateDefaults(object: any, defaults: any): any {
function refReplace(definitions: any, ref: any): any {
// $ref is formatted as "#/definitions/ObjectName"
const referenceStringArray: string[] = ref['$ref'].split('/');
const referenceStringArray: string[] = ref.$ref.split('/');
// Getting "ObjectName"
const referenceName: string = referenceStringArray[referenceStringArray.length - 1];
@@ -69,7 +71,7 @@ function refReplace(definitions: any, ref: any): any {
ref = appendFieldsToObject(reference, ref);
// Remove $ref field
delete ref['$ref'];
delete ref.$ref;
return ref;
}
@@ -114,10 +116,10 @@ function mergeReferences(baseDefinitions: any, additionalDefinitions: any): void
}
}
function generateOptionsSchema(): void {
const packageJSON: any = JSON.parse(fs.readFileSync('package.json').toString());
const schemaJSON: any = JSON.parse(fs.readFileSync('tools/OptionsSchema.json').toString());
const symbolSettingsJSON: any = JSON.parse(fs.readFileSync('tools/VSSymbolSettings.json').toString());
export async function main() {
const packageJSON: any = JSON.parse(await read(resolve($root, 'package.json')));
const schemaJSON: any = JSON.parse(await read(resolve($root, 'tools/OptionsSchema.json')));
const symbolSettingsJSON: any = JSON.parse(await read(resolve($root, 'tools/VSSymbolSettings.json')));
mergeReferences(schemaJSON.definitions, symbolSettingsJSON.definitions);
@@ -132,16 +134,11 @@ function generateOptionsSchema(): void {
packageJSON.contributes.debuggers[1].configurationAttributes.launch = schemaJSON.definitions.CppvsdbgLaunchOptions;
packageJSON.contributes.debuggers[1].configurationAttributes.attach = schemaJSON.definitions.CppvsdbgAttachOptions;
let content: string = JSON.stringify(packageJSON, null, 2);
if (os.platform() === 'win32') {
content = content.replace(/\n/gm, "\r\n");
}
let content: string = JSON.stringify(packageJSON, null, 4);
// We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. This process will
// convert that from the readable espace sequence, to just an invisible character. Convert it back to the visible espace sequence.
content = content.replace(/\u200b/gm, "\\u200b");
content = content.replace(/\u200b/gm, "\\u200b") + "\n";
fs.writeFileSync('package.json', content);
await write('package.json', content);
}
generateOptionsSchema();
+95
View File
@@ -0,0 +1,95 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as fs from "fs";
import * as path from 'path';
import { parseString } from 'xml2js';
import { mkdir, write } from './common';
export async function main() {
const localizeRepoPath = process.argv[2];
const cpptoolsRepoPath = process.argv[3];
if (!localizeRepoPath || !cpptoolsRepoPath) {
console.error(`ERROR: Usage: ${path.parse(process.argv[0]).base} ${path.parse(process.argv[1]).base} <Localize repo path> <vscode-cpptools repo path>`);
return;
}
console.log("Importing EDGE strings from Localize repo: " + localizeRepoPath);
console.log("Writing to cpptools repo: " + cpptoolsRepoPath);
if (!fs.existsSync(path.join(localizeRepoPath, ".git"))) {
console.error("ERROR: Localize repo submodule is not initialized in Localize repo");
return;
}
const languages = [
{ id: "zh-tw", folderName: "cht", transifexId: "zh-hant" },
{ id: "zh-cn", folderName: "chs", transifexId: "zh-hans" },
{ id: "fr", folderName: "fra" },
{ id: "de", folderName: "deu" },
{ id: "it", folderName: "ita" },
{ id: "es", folderName: "esn" },
{ id: "ja", folderName: "jpn" },
{ id: "ko", folderName: "kor" },
{ id: "ru", folderName: "rus" },
{ id: "bg", folderName: "bul" }, // VS Code supports Bulgarian, but VS is not currently localized for those languages.
{ id: "hu", folderName: "hun" }, // VS Code supports Hungarian, but VS is not currently localized for those languages.
{ id: "pt-br", folderName: "ptb", transifexId: "pt-BR" },
{ id: "tr", folderName: "trk" },
{ id: "cs", folderName: "csy" },
{ id: "pl", folderName: "plk" }
];
const locFolderNames = fs.readdirSync(localizeRepoPath).filter(f => fs.lstatSync(path.join(localizeRepoPath, f)).isDirectory());
for (const locFolderName of locFolderNames) {
const lclPath = path.join(localizeRepoPath, locFolderName, "vc/vc/cpfeui.dll.lcl");
const languageInfo = languages.find(l => l.folderName === locFolderName);
if (!languageInfo) {
return;
}
const languageId = languageInfo.id;
const outputLanguageFolder = path.join(cpptoolsRepoPath, "Extension/bin/messages", languageId);
const outputPath = path.join(outputLanguageFolder, "messages.json");
const sourceContent = fs.readFileSync(lclPath, 'utf-8');
// Scan once, just to determine how many there are the size of the array we need
let highestValue = 0;
parseString(sourceContent, function (err, result) {
result.LCX.Item.forEach((item) => {
if (item.$.ItemId === ";String Table") {
item.Item.forEach((subItem) => {
const itemId = parseInt(subItem.$.ItemId, 10);
if (subItem.Str[0].Tgt) {
if (highestValue < itemId) {
highestValue = itemId;
}
}
});
}
});
});
const resultArray = new Array(highestValue);
parseString(sourceContent, function (err, result) {
result.LCX.Item.forEach((item) => {
if (item.$.ItemId === ";String Table") {
item.Item.forEach((subItem) => {
const itemId = parseInt(subItem.$.ItemId, 10);
if (subItem.Str[0].Tgt) {
resultArray[itemId] = subItem.Str[0].Tgt[0].Val[0].replace(/\]5D;/g, "]");
if (highestValue < itemId) {
highestValue = itemId;
}
}
});
}
});
});
await mkdir(outputLanguageFolder);
await write(outputPath, JSON.stringify(resultArray, null, 4) + "\n");
}
}
+17
View File
@@ -0,0 +1,17 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { gray, green, readJson } from './common';
export async function main() {
const pkg = await readJson('package.json') as Record<string, any>;
if (pkg.scripts) {
console.log(green('\n\nAvailable script commands:\n'));
for (const key of Object.keys(pkg.scripts)) {
console.log(green(`yarn ${key} - ${gray(pkg.scripts[key])}`));
}
console.log('');
}
}
+236
View File
@@ -0,0 +1,236 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { runTests } from '@vscode/test-electron';
import { spawnSync } from 'child_process';
import { CommentArray, CommentObject } from 'comment-json';
import { readdir } from 'fs/promises';
import { resolve } from 'path';
import { env } from 'process';
import { returns } from '../src/Utility/Async/returns';
import { filepath } from '../src/Utility/Filesystem/filepath';
import { is } from '../src/Utility/System/guards';
import { verbose } from '../src/Utility/Text/streams';
import { getTestInfo } from '../test/common/selectTests';
import { $args, $root, $scenario, assertAnyFile, assertAnyFolder, brightGreen, checkBinaries, cmdSwitch, cyan, error, gray, green, readJson, red, writeJson } from './common';
import { install, isolated, options } from './vscode';
export { install, reset } from './vscode';
const sowrite = process.stdout.write.bind(process.stdout) as (...args: unknown[]) => boolean;
const sewrite = process.stderr.write.bind(process.stderr) as (...args: unknown[]) => boolean;
const filters = [
/^\[(.*)\].*/,
/^Unexpected token A/,
/Cannot register 'cmake.cmakePath'/,
/\[DEP0005\] DeprecationWarning/,
/--trace-deprecation/,
/Iconv-lite warning/,
/^Extension '/,
/^Found existing install/
];
// remove unwanted messages from stdio
function filterStdio() {
process.stdout.write = function (...args: unknown[]) {
if (typeof args[0] === 'string') {
const text = args[0];
if (filters.some(each => text.match(each))) {
return true;
}
}
if (args[0] instanceof Buffer) {
const text = args[0].toString();
if (filters.some(each => text.match(each))) {
return true;
}
}
return sowrite(...args);
};
process.stderr.write = function (...args: unknown[]) {
if (typeof args[0] === 'string') {
const text = args[0];
if (filters.some(each => text.match(each))) {
return true;
}
}
if (args[0] instanceof Buffer) {
const text = args[0].toString();
if (filters.some(each => text.match(each))) {
return true;
}
}
return sewrite(...args);
};
}
filterStdio();
async function unitTests() {
await assertAnyFolder('dist/test/unit', `The folder '${$root}/dist/test/unit is missing. You should run ${brightGreen("yarn compile")}\n\n`);
const mocha = await assertAnyFile(["node_modules/.bin/mocha.cmd", "node_modules/.bin/mocha"], `Can't find the mocha testrunner. You might need to run ${brightGreen("yarn install")}\n\n`);
const result = spawnSync(mocha, [`${$root}/dist/test/unit/**/*.test.js`, '--timeout', '30000'], { stdio:'inherit', shell: true });
verbose(`\n${green("NOTE:")} If you want to run a scenario test (end-to-end) use ${cmdSwitch('scenario=<NAME>')} \n\n`);
return result.status;
}
async function scenarioTests(assets: string, name: string, workspace: string) {
if (await checkBinaries()) {
process.exit(1);
}
return runTests({
...options,
extensionDevelopmentPath: $root,
extensionTestsPath: resolve($root, 'dist/test/common/selectTests'),
launchArgs: workspace ? [...options.launchArgs, workspace] : options.launchArgs,
extensionTestsEnv: {
SCENARIO: assets
}
});
}
export async function main() {
await assertAnyFolder('dist/test/', `The folder '${$root}/dist/test is missing. You should run ${brightGreen("yarn compile")}\n\n`);
const arg = $args.find(each => !each.startsWith("--"));
const specifiedScenario = $scenario || env.SCENARIO || await getScenarioFolder(arg);
const testInfo = await getTestInfo(specifiedScenario);
if (!testInfo) {
if (arg) {
return error(`Could not find scenario ${arg}`);
}
// lets just run the unit tests
process.exit(await unitTests());
}
// at this point, we're going to run some vscode tests
if (!await filepath.isFolder(isolated)) {
await install();
}
process.exit(await scenarioTests(testInfo.assets, testInfo.name, testInfo.workspace));
}
export async function all() {
if (await checkBinaries()) {
process.exit(1);
}
const finished: string[] = [];
if (await unitTests() !== 0) {
console.log(`${cyan(" UNIT TESTS: ")}${red("failed")}`);
process.exit(1);
}
finished.push(`${cyan(" UNIT TESTS: ")}${green("success")}`);
// at this point, we're going to run some vscode tests
if (!await filepath.isFolder(isolated)) {
await install();
}
try {
const scenarios = await getScenarioNames();
for (const each of scenarios) {
if (await filepath.isFolder(`${$root}/test/scenarios/${each}/tests`)) {
const ti = await getTestInfo(each);
if (ti) {
console.log(`\n\nRunning scenario ${each}`);
const result = await scenarioTests(ti.assets, ti.name, ti.workspace);
if (result) {
console.log(finished.join('\n'));
console.log(` ${cyan(`${ti.name} Tests:`)}${red("failed")}`);
process.exit(result);
}
finished.push(` ${cyan(`${ti.name} Tests:`)}${green("success")}`);
}
}
}
} catch (e) {
error(e);
} finally {
console.log(finished.join('\n'));
}
}
interface Input {
id: string;
type: string;
description: string;
options: CommentArray<{label: string; value: string}>;
}
export async function getScenarioNames() {
return (await readdir(`${$root}/test/scenarios`).catch(returns.none)).filter(each => each !== 'Debugger');
}
export async function getScenarioFolder(scenarioName: string) {
return scenarioName ? resolve(`${$root}/test/scenarios/${(await getScenarioNames()).find(each => each.toLowerCase() === scenarioName.toLowerCase())}`) : undefined;
}
export async function list() {
console.log(`\n${cyan("Scenarios: ")}\n`);
const names = await getScenarioNames();
const max = names.reduce((max, each) => Math.max(max, each), 0);
for (const each of names) {
console.log(` ${green(each.padEnd(max))}: ${gray(await getScenarioFolder(each))}`);
}
}
export async function regen() {
// update the .vscode/launch.json file with the scenarios
const scenarios = await getScenarioNames();
const launch = await readJson(`${$root}/.vscode/launch.json`) as CommentObject;
if (!is.object(launch)) {
return error(`The file ${$root}/.vscode/launch.json is not valid json`);
}
if (!is.array(launch.inputs)) {
return error(`The file ${$root}/.vscode/launch.json is missing the 'inputs' array`);
}
const inputs = launch.inputs as unknown as CommentArray<Input>;
const pickScenario = inputs.find(each => each.id === 'pickScenario');
if (!pickScenario) {
return error(`The file ${$root}/.vscode/launch.json is missing the 'pickScenario' input`);
}
const pickWorkspace = inputs.find(each => each.id === 'pickWorkspace');
if (!pickWorkspace) {
return error(`The file ${$root}/.vscode/launch.json is missing the 'pickWorkspace' input`);
}
for (const scenarioFolder of scenarios) {
const prefix = $root.replace(/\\/g, '/');
if (await filepath.isFolder(`${$root}/test/scenarios/${scenarioFolder}/tests`)) {
const testInfo = await getTestInfo(scenarioFolder);
if (testInfo) {
const label = `${scenarioFolder} `;
const value = testInfo.workspace.replace(/\\/g, '/').replace(prefix, '${workspaceFolder}');
const scenario = pickScenario.options.find(s => s.label === label);
if (!scenario) {
console.log(`Adding scenario ${green(scenarioFolder)} to pickScenario`);
pickScenario.options.push({ label, value });
} else {
verbose(`Skipping scenario ${scenarioFolder} because it already exists`);
}
const wrkspace = pickWorkspace.options.find(s => s.label === label);
if (!wrkspace) {
console.log(`Adding workspace ${green(scenarioFolder)} to pickWorkspace`);
pickWorkspace.options.push({ label, value });
} else {
verbose(`Skipping workspace ${scenarioFolder} because it already exists`);
}
} else {
verbose(`Skipping scenario ${scenarioFolder} because it doesn't look like there are any tests. (maybe try and run ${brightGreen("yarn compile")})`);
}
}
}
await writeJson(`${$root}/.vscode/launch.json`, launch);
}
+12
View File
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "node16",
"moduleResolution": "node16",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"esModuleInterop": true
}
}
+52
View File
@@ -0,0 +1,52 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { checkBinaries, checkCompiled, checkDTS, checkPrep, error, green } from './common';
const quiet = process.argv.includes('--quiet');
export async function main() {
let failing = await checkPrep() && (quiet || error(`Files are not up to date. Run ${green('yarn prep')} to fix it.`));
failing = (await checkCompiled() && (quiet || error(`Compiled files are not present. Run ${green('yarn compile')} to fix it.`))) || failing;
failing = (await checkBinaries() && (quiet || error(`The native binary files are not present. You should either build or install the native binaries\n\n.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function compiled() {
let failing = false;
failing = (await checkCompiled() && (quiet || error(`Compiled files are not present. Run ${green('yarn compile')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function binaries() {
let failing = false;
failing = (await checkBinaries() && (quiet || error(`The native binary files are not present. You should either build or install the native binaries\n\n.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function prep() {
let failing = false;
failing = (await checkPrep() && (quiet || error(`Files are not up to date. Run ${green('yarn prep')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function dts() {
let failing = false;
failing = (await checkDTS() && (quiet || error(`VSCode import files are not present. Run ${green('yarn prep')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
+61
View File
@@ -0,0 +1,61 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath } from '@vscode/test-electron';
import { createHash } from 'crypto';
import { tmpdir } from 'os';
import { resolve } from 'path';
import { verbose } from '../src/Utility/Text/streams';
import { mkdir, readJson, rimraf, write } from './common';
export const isolated = resolve(tmpdir(), '.vscode-test', createHash('sha256').update(__dirname).digest('hex').substring(0, 6));
export const extensionsDir = resolve(isolated, 'extensions');
export const userDir = resolve(isolated, 'user-data');
export const settings = resolve(userDir, "User", 'settings.json');
export const options = {
cachePath: `${isolated}/cache`,
launchArgs: ['--no-sandbox', '--disable-updates', '--skip-welcome', '--skip-release-notes', `--extensions-dir=${extensionsDir}`, `--user-data-dir=${userDir}`, '--disable-workspace-trust']
};
export async function install() {
try {
// Create a new isolated directory for VS Code instance in the test folder, and make it specific to the extension folder so we can avoid collisions.
// keeping this out of the Extension folder means we're not worried about VS Code getting weird with locking files and such.
verbose(`Isolated VSCode test folder: ${isolated}`);
await mkdir(isolated);
const vscodeExecutablePath = await downloadAndUnzipVSCode(options);
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath).filter(each => !each.startsWith('--extensions-dir=') && !each.startsWith('--user-data-dir='));
args.push(`--extensions-dir=${extensionsDir}`, `--user-data-dir=${userDir}`);
// install the appropriate extensions
// spawnSync(cli, [...args, '--install-extension', 'ms-vscode.cpptools'], { encoding: 'utf-8', stdio: 'ignore' });
// spawnSync(cli, [...args, '--install-extension', 'twxs.cmake'], { encoding: 'utf-8', stdio: 'ignore' });
// spawnSync(cli, [...args, '--install-extension', 'ms-vscode.cmake-tools'], { encoding: 'utf-8', stdio: 'ignore' });
const settingsJson = await readJson(settings, {});
if (!settingsJson["workbench.colorTheme"]) {
settingsJson["workbench.colorTheme"] = "Tomorrow Night Blue";
}
settingsJson["git.openRepositoryInParentFolders"] = "never";
await write(settings, JSON.stringify(settingsJson, null, 4));
return {
cli, args
};
} catch (err: unknown) {
console.log(err);
}
}
export async function reset() {
verbose(`Removing VSCode test folder: ${isolated}`);
await rimraf(isolated);
}
+141 -126
View File
@@ -1,128 +1,143 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension (development)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "Compile Dev",
},
{
"name": "Launch Extension (production)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "TypeScript Compile",
},
{
"name": "Launch Extension (do not build)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
},
{
"name": "Launch Extension (watch, development)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "Compile Dev Watch",
},
{
"name": "Launch Extension (watch, production)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "TypeScript Compile Watch",
},
{
"name": "Launch Unit Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/unitTests/index"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "Pretest"
},
{
"name": "Launch Integration Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/test/integrationTests/testAssets/SimpleCppProject/simpleCppProject.code-workspace",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/integrationTests/languageServer/index"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "Pretest",
},
{
"name": "Launch E2E IntelliSense features tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"C:/git/Vcls-vscode-test/MultirootDeadlockTest/test.code-workspace",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/integrationTests/IntelliSenseFeatures/index"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "Pretest"
},
{
"name": "Node Attach",
"type": "node",
"request": "attach",
"port": 5858
},
]
}
"version": "0.1.0",
"configurations": [
{
// debugs the extension
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--no-sandbox",
"--disable-updates",
"--skip-welcome",
"--skip-release-notes",
"--disable-workspace-trust",
"--extensionDevelopmentPath=${workspaceFolder}",
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**"
],
// you can use a watch task as a prelaunch task and it works like you'd want it to.
"preLaunchTask": "watch"
},
{
// debugs the extension (selecting the workspace)
"name": "Run Extension-Select Workspace",
"type": "extensionHost",
"request": "launch",
"args": [
"--no-sandbox",
"--disable-updates",
"--skip-welcome",
"--skip-release-notes",
"--disable-workspace-trust",
"--extensionDevelopmentPath=${workspaceFolder}",
"${input:pickWorkspace}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**"
],
// you can use a watch task as a prelaunch task and it works like you'd want it to.
"preLaunchTask": "watch"
},
{
// debug scenario tests (selecting the workspace)
"name": "VSCode Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"env": {
"SCENARIO": "${input:pickScenario}"
},
"args": [
"--no-sandbox",
"--disable-updates",
"--skip-welcome",
"--skip-release-notes",
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test/common/selectTests",
"--scenario=${input:pickScenario}",
"${input:pickScenario}"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**"
],
// you can use a watch task as a prelaunch task and it works like you'd want it to.
"preLaunchTask": "watch"
},
{
// used for debugging unit tests
"name": "MochaTest",
"type": "node",
"request": "attach",
"port": 9229,
"continueOnAttach": true,
"autoAttachChildProcesses": false,
"skipFiles": [
"<node_internals>/**"
],
"outFiles": [
"${workspaceFolder}/dist/**",
"!**/node_modules/**"
]
}
],
"inputs": [
{
"type": "pickString",
"id": "pickScenario",
"description": "Select which scenario to debug VSCode tests.",
"options": [
{
"label": "MultirootDeadlockTest ",
"value": "${workspaceFolder}/test/scenarios/MultirootDeadlockTest/assets/test.code-workspace"
},
{
"label": "SimpleCppProject ",
"value": "${workspaceFolder}/test/scenarios/SimpleCppProject/assets/simpleCppProject.code-workspace"
},
{
"label": "SingleRootProject ",
"value": "${workspaceFolder}/test/scenarios/SingleRootProject/assets/"
},
{
"label": "CompilerDetection ",
"value": "${workspaceFolder}/test/scenarios/CompilerDetection/assets"
}
]
},
{
"type": "pickString",
"id": "pickWorkspace",
"description": "Select which workspace scenario to debug VSCode.",
"default": "-n",
"options": [
{
"label": "(Debug with new window) ",
"value": "-n"
},
{
"label": "MultirootDeadlockTest ",
"value": "${workspaceFolder}/test/scenarios/MultirootDeadlockTest/assets/test.code-workspace"
},
{
"label": "SimpleCppProject ",
"value": "${workspaceFolder}/test/scenarios/SimpleCppProject/assets/simpleCppProject.code-workspace"
},
{
"label": "SingleRootProject ",
"value": "${workspaceFolder}/test/scenarios/SingleRootProject/assets/"
},
{
"label": "CompilerDetection ",
"value": "${workspaceFolder}/test/scenarios/CompilerDetection/assets"
}
]
}
]
}
+65 -8
View File
@@ -1,10 +1,67 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
}
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
// if you install the mocha test explorer extension, you can run the unit tests from the test explorer UI
"testExplorer.useNativeTesting": true,
"mochaExplorer.files": "./**/unit/**/*.test.js",
"mochaExplorer.watch": "./**/unit/**/*.test.js",
"mochaExplorer.ignore": [
"**/*skip*",
"**/dist/test/**/*.d.ts",
"**/node_modules/**"
],
"mochaExplorer.debuggerConfig": "MochaTest",
"mochaExplorer.logpanel": true,
"mochaExplorer.timeout": 500000,
"mochaExplorer.require": [
"source-map-support/register"
],
"mochaExplorer.monkeyPatch": true,
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.json-language-features",
"editor.tabSize": 4,
"files.insertFinalNewline": true
},
"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "vscode.json-language-features",
"editor.tabSize": 4,
"files.insertFinalNewline": true
},
"[typescript]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
},
"eslint.format.enable": true,
"[javascript]": {
"editor.tabSize": 4,
},
"markdown.extension.list.indentationSize": "inherit",
"markdown.extension.toc.levels": "2..6",
"[markdown]": {
"editor.tabSize": 4,
},
"eslint.workingDirectories": [
{
"changeProcessCWD": true,
"directory": "./",
},
{
"changeProcessCWD": true,
"directory": "./.scripts",
}
],
}
+10 -153
View File
@@ -4,168 +4,25 @@
"version": "2.0.0",
"tasks": [
{
"label": "TypeScript Compile",
"label": "compile",
"type": "npm",
"script": "compile",
"problemMatcher": "$tsc",
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"type": "shell",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared"
},
"command": "yarn",
"args": [
"run",
"compile"
]
}
},
{
"label": "TypeScript Lint",
"group": "build",
"isBackground": false,
"type": "shell",
"command": "yarn",
"args": [
"run",
"lint"
],
"problemMatcher": {
"fileLocation": "absolute",
"source": "lint",
"pattern": [
{
"regexp": "(ERROR:) ([a-zA-Z/:\\-\\.]*)\\[(\\d+), (\\d+)\\]: (.*)",
"severity": 1,
"file": 2,
"line": 3,
"column": 4,
"message": 5
}
]
},
"dependsOn": [
"Compile Dev"
]
},
{
"label": "Compile Dev",
"group": "build",
"isBackground": false,
"type": "shell",
"command": "yarn",
"args": [
"run",
"compile-dev"
]
},
{
"label": "Pretest",
"group": "build",
"isBackground": false,
"type": "shell",
"command": "yarn",
"args": [
"run",
"pretest"
],
"dependsOn": [
"Compile Dev"
]
},
{
"label": "TypeScript Compile Watch",
"label": "watch",
"type": "npm",
"script": "watch",
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": true,
"type": "shell",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared"
},
"command": "yarn",
"args": [
"run",
"compile-watch"
],
"problemMatcher": [
{
"owner": "typescript",
"source": "ts",
"applyTo": "closedDocuments",
"fileLocation": "absolute",
"severity": "error",
"pattern": [
{
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
"file": 1,
"line": 2,
"column": 3
},
{
"regexp": "\\s*TS\\d+:\\s*(.*)",
"message": 1
}
],
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "asset"
},
"endsPattern": {
"regexp": "webpack (.*?) compiled (.*?) ms"
}
}
}
]
},
{
"label": "Compile Dev Watch",
"group": "build",
"isBackground": true,
"type": "shell",
"command": "yarn",
"args": [
"run",
"compile-dev-watch"
],
"problemMatcher": [
{
"owner": "typescript",
"source": "ts",
"applyTo": "closedDocuments",
"fileLocation": "absolute",
"severity": "error",
"pattern": [
{
"regexp": "\\[tsl\\] ERROR in (.*)?\\((\\d+),(\\d+)\\)",
"file": 1,
"line": 2,
"column": 3
},
{
"regexp": "\\s*TS\\d+:\\s*(.*)",
"message": 1
}
],
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "asset"
},
"endsPattern": {
"regexp": "webpack (.*?) compiled (.*?) ms"
}
}
}
]
"problemMatcher": "$tsc-watch",
}
]
}
}
+54 -47
View File
@@ -1,47 +1,54 @@
# ignore vscode settings for extension development
.vscode/**
# ignore binaries
obj/**
# ignore source files
tools/**
notices/**
test/**
src/**
# ignore .js files that are webpacked or only used for development
out/src/**
out/tools/**
# ignore ts files in ui
ui/*.ts
# ignore Azure-Pipelines files
jobs/**
cgmanifest.json
# ignore development files
tsconfig.json
test.tsconfig.json
tslint.json
.eslintrc.js
webpack.config.js
tscCompileList.txt
gulpfile.js
.gitattributes
.gitignore
CMakeLists.txt
debugAdapters/install.lock*
typings/**
**/*.map
import_edge_strings.js
localized_string_ids.h
translations_auto_pr.js
# ignore i18n language files
i18n/**
# ignore node_modules
node_modules/
# ignore vscode settings for extension development
.vscode/**
# ignore binaries
obj/**
# ignore source files
tools/**
notices/**
test/**
src/**
# ignore .js files that are webpacked or only used for development
out/src/**
out/tools/**
# don't include the local code and tests compiled files
dist/test/**
# no project scripts
.scripts/**
# ignore ts files in ui
ui/*.ts
# ignore Azure-Pipelines files
jobs/**
cgmanifest.json
# ignore development files
tsconfig.json
test.tsconfig.json
ui.tsconfig.json
tslint.json
.eslintrc.js
webpack.config.js
tscCompileList.txt
gulpfile.js
.gitattributes
.gitignore
CMakeLists.txt
debugAdapters/install.lock*
typings/**
**/*.map
import_edge_strings.js
localized_string_ids.h
translations_auto_pr.js
# ignore i18n language files
i18n/**
# ignore node_modules
node_modules/
+7
View File
@@ -0,0 +1,7 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
ignore-engines true
disable-self-update-check true
--run.silent true
+348 -16
View File
@@ -1,5 +1,337 @@
# C/C++ for Visual Studio Code Changelog
## Version 1.22.2: August 29, 2024
### Enhancement
* Remove the `C_Cpp.intelliSenseEngineFallback` setting. [#12596](https://github.com/microsoft/vscode-cpptools/issues/12596)
### Bug Fix
* Fix a deadlock when doing "Find All References" and a file is deleted. [#12656](https://github.com/microsoft/vscode-cpptools/issues/12656)
## Version 1.22.1: August 29, 2024
### Enhancement
* Add "Additional Tracked Settings" to `C/C++: Log Diagnostics` output. [PR #12635](https://github.com/microsoft/vscode-cpptools/pull/12635)
### Bug Fixes
* Fix hover over static constexpr variables sometimes not working. [#12284](https://github.com/microsoft/vscode-cpptools/issues/12284)
* Fix completion not giving results in several scenarios. [#12412](https://github.com/microsoft/vscode-cpptools/issues/12412)
* Fix include completion showing results for deleted folders with recursive includes. [#12636](https://github.com/microsoft/vscode-cpptools/issues/12636)
* Fix the `/FU` flag not working for C++/CLI . [#12641](https://github.com/microsoft/vscode-cpptools/issues/12641)
* Fix some crashes with recursive includes. [#12643](https://github.com/microsoft/vscode-cpptools/issues/12643)
* Fix IntelliSense not working on Windows when `C_Cpp.caseSensitiveFileSupport` is `enabled`. [#12648](https://github.com/microsoft/vscode-cpptools/issues/12648)
* Changes that might fix a crash with `translate_encoding_to_utf8`. [#12652](https://github.com/microsoft/vscode-cpptools/issues/12652)
* Fix a random crash during IntelliSense creation.
## Version 1.22.0: August 26, 2024
### Performance Improvements
* Switch to an alternative implementation of recursive includes (that sends all the paths instead of only the "used" paths). [#11780](https://github.com/microsoft/vscode-cpptools/issues/11780)
- Performance improvement: Configuration is no longer blocked on tag parsing of all dependent headers.
- Configuration change: Recursive include paths now take precedence over system include paths (similar to compiler behavior and non-recursive includes). [#11485](https://github.com/microsoft/vscode-cpptools/issues/11485)
* Initialization performance improvements. [#12030](https://github.com/microsoft/vscode-cpptools/issues/12030)
- Some processing is parallelized and started earlier (populating the filename cache, discovering files). [#11954](https://github.com/microsoft/vscode-cpptools/issues/11954), [#12169](https://github.com/microsoft/vscode-cpptools/issues/12169)
- Some compiler configuration queries are cached in the database, and processing of compile_commands.json was improved. [#10029](https://github.com/microsoft/vscode-cpptools/issues/10029), [#12078](https://github.com/microsoft/vscode-cpptools/issues/12078)
* Improve the implementation of file buffers to reduce memory usage.
### Enhancements
* Add modified `C_Cpp` settings to the `C/C++: Log Diagnostics` output. [#11700](https://github.com/microsoft/vscode-cpptools/issues/11700)
* Change the default C/C++ `"editor.stickyScroll.defaultModel"` to `"foldingProviderModel"`. [#12483](https://github.com/microsoft/vscode-cpptools/issues/12483)
* Add better validation for settings. [#12371](https://github.com/microsoft/vscode-cpptools/issues/12371)
* Various IntelliSense parsing updates/fixes.
### Bug Fixes
* Stop logging duplicate compiler path messages. [#12445](https://github.com/microsoft/vscode-cpptools/issues/12445)
* Fix an issue where a file is incorrectly processed as C instead of C++. [#12466](https://github.com/microsoft/vscode-cpptools/issues/12466)
* Fix include path ordering being incorrect if there is a duplicate. [#12525](https://github.com/microsoft/vscode-cpptools/issues/12525)
* Fix a WebAssembly "Out of Memory" error. [#12529](https://github.com/microsoft/vscode-cpptools/issues/12529)
* Fix an error message not being shown if the connection failed with remote attach debugging. [#12547](https://github.com/microsoft/vscode-cpptools/issues/12547)
* Thank you for the contribution. [@MrStanislav0 (Stanislav)](https://github.com/MrStanislav0)
* Fix `-I` not being used if `-iquote` is also used for the same path. [#12551](https://github.com/microsoft/vscode-cpptools/issues/12551)
* Fix issues with relative paths on `nvcc` (CUDA) command lines not being handled correctly. [#12553](https://github.com/microsoft/vscode-cpptools/issues/12553)
* Fix a random crash when a child process is created. [#12585](https://github.com/microsoft/vscode-cpptools/issues/12585)
* Fix a crash on shutdown on macOS with a verbose logging level. [#12567](https://github.com/microsoft/vscode-cpptools/issues/12567)
* Fix some issues with recursive includes handling of symbolic links, multi-root, exclusion changes, and file/folder deletion.
* Fix unnecessary IntelliSense resetting when a new file or folder was created.
* Fix accumulation of stale signature help and completion requests.
* Fix some bugs with include completion.
## Version 1.21.6: August 5, 2024
* Fix a cpptools-srv crash on shutdown. [#12354](https://github.com/microsoft/vscode-cpptools/issues/12354)
## Version 1.21.5: July 31, 2024
### Bug Fixes
* Fix clang-format and clang-tidy not working on Windows 10. [#12289](https://github.com/microsoft/vscode-cpptools/issues/12289)
* Fix a crash with cpptools-srv on certain macOS versions. [#12354](https://github.com/microsoft/vscode-cpptools/issues/12354)
* Fix cpptools crashing on macOS Big Sur or older. [#12511](https://github.com/microsoft/vscode-cpptools/issues/12511)
* Fix debugging on Windows ARM64. [#12520](https://github.com/microsoft/vscode-cpptools/issues/12520)
## Version 1.21.4: July 25, 2024
* Re-enable compatibility with VS Code 1.67.0 (instead of 1.82.0). [#12507](https://github.com/microsoft/vscode-cpptools/issues/12507)
## Version 1.21.3: July 24, 2024
* Fix a crash on Linux ARM OS's. [#12497](https://github.com/microsoft/vscode-cpptools/issues/12497)
## Version 1.21.2: July 12, 2024
### Enhancements
* Add `see` and `sa` to the `C_Cpp.doxygen.sectionTags` setting. [#12384](https://github.com/microsoft/vscode-cpptools/issues/12384)
* Update the vcpkg header database. [PR #12430](https://github.com/microsoft/vscode-cpptools/pull/12430)
* Disable the pre-release prompt if the `extensions.ignoreRecommendations` setting is `true`. [#12438](https://github.com/microsoft/vscode-cpptools/issues/12438)
* Switch to an alternative workspace symbol search implementation (performance and results will be slightly different from previous versions).
* Various IntelliSense engine updates/fixes.
### Bug Fixes
* Stop logging file watch events for excluded files. [#11455](https://github.com/microsoft/vscode-cpptools/issues/11455)
* Fix a crash if the Ryzen 3000 doesn't have updated drivers. [#12201](https://github.com/microsoft/vscode-cpptools/issues/12201)
* Fix handling of `-isystem` and `-iquote` for IntelliSense configuration. [#12207](https://github.com/microsoft/vscode-cpptools/issues/12207)
* Fix doxygen comment generation when `/**` comments are used. [#12249](https://github.com/microsoft/vscode-cpptools/issues/12249)
* Fix a code analysis crash on Linux if the message is too long. [#12285](https://github.com/microsoft/vscode-cpptools/issues/12285)
* Fix relative paths in `compile_commands.json` to be relative to the `compile_commands.json`'s directory. [#12290](https://github.com/microsoft/vscode-cpptools/issues/12290)
* Fix a tag parser performance regression. [#12292](https://github.com/microsoft/vscode-cpptools/issues/12292)
* Fix a regression with cl.exe system include path detection. [#12293](https://github.com/microsoft/vscode-cpptools/issues/12293)
* Fix code analysis, find all references, and rename from getting the wrong configuration for non-open files on the first run when using a configuration provider. [#12313](https://github.com/microsoft/vscode-cpptools/issues/12313)
* Fix handling of doxygen comment blocks with `*//*` in them. [#12316](https://github.com/microsoft/vscode-cpptools/issues/12316)
* Fix potential crashes during IntelliSense process shutdown. [#12354](https://github.com/microsoft/vscode-cpptools/issues/12354)
* Fix the language status not showing it's busy while the tag parser is initializing. [#12403](https://github.com/microsoft/vscode-cpptools/issues/12403)
* Fix the vcpkg code action not appearing for missing headers available via vcpkg. [#12413](https://github.com/microsoft/vscode-cpptools/issues/12413)
* Fix custom configurations sometimes not getting used. [PR #12427](https://github.com/microsoft/vscode-cpptools/pull/12427)
* Fix a code analysis error when using gcc 14. [#12428](https://github.com/microsoft/vscode-cpptools/issues/12428)
* Fix warning notification showing when `C_Cpp.getIncludes` is disabled. [PR #12470](https://github.com/microsoft/vscode-cpptools/pull/12470)
* Fix a cause of colorization, inactive regions, and inlay hints getting cleared when an update is pending.
* Update the default clang/gcc versions used for IntelliSense if an unknown version is found.
* Fix a cause of semantic tokens transiently being placed in the wrong location.
* Update clang-format and clang-tidy from 18.1.2 to 18.1.7 (for the bug fixes).
* Fix a potential deadlock when configured using compile commands.
## Version 1.20.5: May 6, 2024
### Enhancements
* Add support for C++ modules IFC version 0.43. [#10843](https://github.com/microsoft/vscode-cpptools/issues/10843)
* Add support for `${userHome}` in `c_cpp_properties.json`. [#11756](https://github.com/microsoft/vscode-cpptools/issues/11756)
* Reduce the default max workspace symbol search results and add `C_Cpp.maxSymbolSearchResults`. [PR #12131](https://github.com/microsoft/vscode-cpptools/pull/12131)
* Update `clang-format`/`clang-tidy` to 18.1.2. [PR #12135](https://github.com/microsoft/vscode-cpptools/pull/12135)
* Log `cpptools` and `cpptools-srv` crash call stacks in the 'C/C++ Crash Call Stacks' Output channel for bug reporting (on x64 Linux and x64/arm64 Mac).
* Increase the fuzzy symbol character limit from 16 to 28.
* Update the IntelliSense engine.
### Bug Fixes
* Fix an IntelliSense parsing issue. [#6183](https://github.com/microsoft/vscode-cpptools/issues/6183)
* Fix 'Copy Declaration / Definition' code not being formatted. [#10956](https://github.com/microsoft/vscode-cpptools/issues/10956)
* Fix semantic colorization of certain macro arguments. [#11416](https://github.com/microsoft/vscode-cpptools/issues/11416)
* Fix 'Add #include' code actions for code scoped by a namespace or class. [#11541](https://github.com/microsoft/vscode-cpptools/issues/11541)
* Fix 'Create Declaration / Definition' not working if the cursor isn't on the function name. [#11834](https://github.com/microsoft/vscode-cpptools/issues/11834)
* Fix duplicate 'Add #include' code actions. [#11989](https://github.com/microsoft/vscode-cpptools/issues/11989)
* Fix directories being incorrectly recursively traversed in certain cases. [#11993](https://github.com/microsoft/vscode-cpptools/issues/11993)
* Fix `forcedInclude` resolution for relative paths. [PR #12035](https://github.com/microsoft/vscode-cpptools/pull/12035)
* Fix 'Add Configuration...' in `launch.json` when `editor.suggest.showSnippets` is `false`. [#12059](https://github.com/microsoft/vscode-cpptools/issues/12059)
* Fix `c_cpp_properties.json` warnings for `includePath`s with `**` wildcard glob patterns. [#12070](https://github.com/microsoft/vscode-cpptools/issues/12070)
* Fix non-existent relative path variables not showing a warning in `c_cpp_properties.json` (and other related issues). [#12089](https://github.com/microsoft/vscode-cpptools/issues/12089)
* Fix call stacks for `cpptools` and `cpptools-srv` not being available on Linux. [#12091](https://github.com/microsoft/vscode-cpptools/issues/12091)
* Fix IntelliSense processes shutting down immediately if not enough memory is detected. [#12126](https://github.com/microsoft/vscode-cpptools/issues/12126)
* Fix code analysis aborting after encountering an excluded file (instead of just skipping it). [#12127](https://github.com/microsoft/vscode-cpptools/issues/12127)
* Fix `"Cannot open source"` errors on missing includes not appearing if `C_Cpp.errorSquiggles` is `enabled`. [#12134](https://github.com/microsoft/vscode-cpptools/issues/12134)
* Fix the IntelliSense server not starting when a completion, signature help, or document highlight occurs from external commands. [#12143](https://github.com/microsoft/vscode-cpptools/issues/12143)
* Fix the IntelliSense configuration not falling back to the `c_cpp_properties.json` configuration for a file not handled by a configuration provider. [#12144](https://github.com/microsoft/vscode-cpptools/issues/12144)
* Fix duplicate URIs in calls to provideConfigurations. [#12177](https://github.com/microsoft/vscode-cpptools/issues/12177)
* Fix a crash and deadlock with a high `C_Cpp.loggingLevel`. [#12194](https://github.com/microsoft/vscode-cpptools/issues/12194)
* Fix handling of `-iquote` for code analysis and `#include` completions. [#12198](https://github.com/microsoft/vscode-cpptools/issues/12198)
* Fix a crash during startup. [#12237](https://github.com/microsoft/vscode-cpptools/issues/12237)
* Fix IntelliSense configuration on Windows ARM64. [#12253](https://github.com/microsoft/vscode-cpptools/issues/12253)
* Fix a `cpptools` process crash and deadlock during shutdown.
## Version 1.19.9: March 20, 2024
### Bug Fixes
* Fix an issue with Cygwin system headers not being properly detected. [#12113](https://github.com/microsoft/vscode-cpptools/issues/12113)
* Fix a crash in cpptools-srv when low on memory. [#12121](https://github.com/microsoft/vscode-cpptools/issues/12121)
* Fix an issue preventing cpptools-srv from being relaunched after a crash.
## Version 1.19.8: March 13, 2024
### Bug Fixes
* Fix an issue with applying the proper working directory from a `compile_commands.json` when a `compilePath` is also set. [#12024](https://github.com/microsoft/vscode-cpptools/issues/12024)
* Fix a deadlock. [#12051](https://github.com/microsoft/vscode-cpptools/issues/12051)
* Fix a crash that could occur when failing to query clang-cl.
* Fix an issue with handling of `winsysroot` args for clang-cl.
* Fix an issue with processing relative include paths returned by clang-cl.
## Version 1.19.7: March 11, 2024
### Bug Fixes
* Fix some potential deadlocks. [#12051](https://github.com/microsoft/vscode-cpptools/issues/12051)
* Fix a crash related to parsing concepts. [#12060](https://github.com/microsoft/vscode-cpptools/issues/12060)
* Fix flickering status updates in the language status bar. [#12084](https://github.com/microsoft/vscode-cpptools/issues/12084)
* Fix a cpptools crash that can occur if cpptools-srv crashes on initialization.
## Version 1.19.6: March 6, 2024
### Enhancement
* Performance improvement.
## Version 1.19.5: March 4, 2024
### Enhancements
* Change how `args` and `command` fields are handled in `cppbuild` tasks, to match the behavior of VS Code `shell` build tasks, including explicit `quoting` support. [#12001](https://github.com/microsoft/vscode-cpptools/issues/12001)
* Enable C23 IntelliSense support, and add support for `clatest` `std` value for MSVC. [#12020](https://github.com/microsoft/vscode-cpptools/issues/12020)
### Bug Fixes
* Fix the IntelliSense cache not being pruned. [#11925](https://github.com/microsoft/vscode-cpptools/issues/11925)
* Fix an issue with duplicate `Add #include` code actions appearing if the same header name exists in multiple locations. [#11989](https://github.com/microsoft/vscode-cpptools/issues/11989)
* Fix compiler querying with a `-index-store-path` argument. [#12012](https://github.com/microsoft/vscode-cpptools/issues/12012)
* Fix an issue with changes to `C_Cpp.inlayHints` settings not taking effect immediately. [#12013](https://github.com/microsoft/vscode-cpptools/issues/12013)
* Fix an issue with how Doxygen `brief` and `param` are displayed on hover. [#12015](https://github.com/microsoft/vscode-cpptools/issues/12015)
* Fix an issue preventing the extension from functioning if installed via snap on Linux. [#12021](https://github.com/microsoft/vscode-cpptools/issues/12021)
* Fix compiler querying with a `-Xclang -mllvm` argument. [#12024](https://github.com/microsoft/vscode-cpptools/issues/12024)
* Fix the include graph lookup not occurring for source files. [#12036](https://github.com/microsoft/vscode-cpptools/issues/12036)
* Fix exclusions not applying to dependent headers with recursive includes. [#12042](https://github.com/microsoft/vscode-cpptools/issues/12042)
* Fix a potential cpptools process hang on shutdown.
## Version 1.19.4: February 21, 2024
### Enhancements
* Enable support for fuzzy symbol searches. [#2751](https://github.com/microsoft/vscode-cpptools/issues/2751)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Implement progressive population of IntelliSense results. [#7759](https://github.com/microsoft/vscode-cpptools/issues/7759)
* Improve performance of symbol searches. [#7908](https://github.com/microsoft/vscode-cpptools/issues/7908), [#7914](https://github.com/microsoft/vscode-cpptools/issues/7914), [#11557](https://github.com/microsoft/vscode-cpptools/issues/11557)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Support insert mode for auto-complete. [#10613](https://github.com/microsoft/vscode-cpptools/issues/10613)
* Use the `"[cpp]": { "editor.suggest.insertMode": "insert" } ` and `"[c]": { "editor.suggest.insertMode": "insert" } ` settings to override the extension's defaults.
* Improve memory efficiency by using token parsing in the 'Add #include' feature. [#11515](https://github.com/microsoft/vscode-cpptools/issues/11515)
* Change the default setting value for `C_Cpp.intelliSenseUpdateDelay` from 2s to 1s. [PR #11932](https://github.com/microsoft/vscode-cpptools/pull/11932)
* Improve the types supported for the 'Add #include' code action.
* Various performance improvements.
### Bug Fixes
* Fix IntelliSense bug with type deduction using concepts. [#8132](https://github.com/microsoft/vscode-cpptools/issues/8132)
* Fix clang-format error messages not being logged. [#8944](https://github.com/microsoft/vscode-cpptools/issues/8944)
* Fix indentation missing in markdown fenced code blocks. [#11379](https://github.com/microsoft/vscode-cpptools/issues/11379)
* Fix shell escaping for `cppbuild` task command line arguments. [#11422](https://github.com/microsoft/vscode-cpptools/issues/11422)
* Fix IntelliSense not updating when a `#include` is added from a refactor command. [#11549](https://github.com/microsoft/vscode-cpptools/issues/11549)
* Fix 'Add '#include' code actions for Mac frameworks. [#11579](https://github.com/microsoft/vscode-cpptools/issues/11579)
* Fix the parent path of the source file in `compile_commands.json` not being added to the browse.path. [#11631](https://github.com/microsoft/vscode-cpptools/issues/11631)
* Fix the database not getting updated in certain cases when switching configurations. [#11649](https://github.com/microsoft/vscode-cpptools/issues/11649)
* Fix a cpptools crash with certain projects. [#11674](https://github.com/microsoft/vscode-cpptools/issues/11674)
* Fix snippet and include completion. [#11715](https://github.com/microsoft/vscode-cpptools/issues/11715), [#11720](https://github.com/microsoft/vscode-cpptools/issues/11720)
* Fix formatting not working in headers after using 'Extract to Function'. [#11729](https://github.com/microsoft/vscode-cpptools/issues/11729)
* Fix document symbol requests not checking for cancellation. [#11750](https://github.com/microsoft/vscode-cpptools/issues/11750)
* Fix the default `editor.wordBasedSuggestions` setting for VS Code versions 1.85 or newer. [PR #11773](https://github.com/microsoft/vscode-cpptools/pull/11773)
* This change doesn't work with VS Code versions 1.84 or older, due to [Microsoft/vscode#200685](https://github.com/microsoft/vscode/issues/200685)
* Fix code analysis results getting cleared after there's a configuration update. [#11790](https://github.com/microsoft/vscode-cpptools/issues/11790)
* Fix an exception getting thrown if IntelliSense is disabled but a configuration provider is registered. [#11795](https://github.com/microsoft/vscode-cpptools/issues/11795)
* Fix an EACCES error when using include wildcards with system includes. [#11833](https://github.com/microsoft/vscode-cpptools/issues/11833)
* Fix German code analysis translations. [PR #11845](https://github.com/microsoft/vscode-cpptools/pull/11845)
* Thank you for the contribution. [@Sir2B (Tobias Obermayer)](https://github.com/Sir2B)
* Trim trailing spaces from include paths in the configuration UI. [#11862](https://github.com/microsoft/vscode-cpptools/issues/11862)
* Fix comma delimited lists in `@param` Doxygen parameters. [#11868](https://github.com/microsoft/vscode-cpptools/issues/11868)
* Fix incorrect errors for `compilerPath` in the configuration UI for compilers that can be found in PATH. [#11903](https://github.com/microsoft/vscode-cpptools/issues/11903)
* Fix an issue with include sorting when formatting with clang-format. [#11914](https://github.com/microsoft/vscode-cpptools/issues/11914)
* Fix the `-include` arg of `-Xarg_<arg1>` getting filtered out, leading to a failed compiler query. [#11965](https://github.com/microsoft/vscode-cpptools/issues/11965)
* Fix the `-arch` flag overwriting the `-target` flag's value when it shouldn't. [#11971](https://github.com/microsoft/vscode-cpptools/issues/11971)
* Fix an issue in which the directory specified in a `compile_commands.json` was not being used as the current directory when querying the specified compiler path.
* Fix an issue with configuring IntelliSense for a header file after having chosen an associated source file in which inclusion of the header is disabled or removed.
* Fix an issue where use of an explicit `compilerPath` to override the compiler in a `compile_commands.json` will also throw out the compiler arguments.
* Fix IntelliSense passes occurring while a user is still typing, instead of honoring the `C_Cpp.intelliSenseUpdateDelay` setting.
* Fix issues related to support for C++ modules and parsing of related compiler arguments.
* Fix issues with the tag parsing status sometimes not being accurately reflected in the UI.
* Fix document and workspace symbol requests being blocked by an IntelliSense request.
* Remove the requirement that a file be open in the editor from various LSP requests.
* Fix a crash if `compile_commands.json` doesn't have an array at the root.
* Fix a call hierarchy bug leading to use of header-only TU's unnecessarily.
* Fix an issue that could result in the Outline pane not being populated.
* Fix a bug that could lead to missing TU source file candidates.
* Address multiple issues with compiler querying of clang-cl.
* Fix a potential crash when using 'Find All References'.
* Fix a "random" IntelliSense crash during completion.
* Fix a crash if access to `/dev/urandom` is restricted.
* Fix some crashes reported by crash telemetry.
* Lots of other minor fixes.
## Version 1.18.5: November 16, 2023
### Bug Fix
* Fix `~/vscode-cpptools` being used as the cache folder instead of `~/.cache/vscode-cpptools` on Linux. [#11693](https://github.com/microsoft/vscode-cpptools/issues/11693)
## Version 1.18.4: November 14, 2023
### Bug Fixes:
* Fix 'Extract to function' not scrolling to and selecting the added header declaration. [#11676](https://github.com/microsoft/vscode-cpptools/issues/11676)
* Fix the extension sometimes failing to activate with VS Code versions less than 1.85. [#11680](https://github.com/microsoft/vscode-cpptools/issues/11680)
## Version 1.18.3: November 13, 2023
### New Features
* Add an 'Extract to function' (or member function) code action after selecting code. [#1162](https://github.com/microsoft/vscode-cpptools/issues/1162)
* Compiler acquisition improvements. [#10525](https://github.com/microsoft/vscode-cpptools/issues/10525)
* Provide `Add '#include'` code action suggestions for IntelliSense errors related to symbols not being found. [#10791](https://github.com/microsoft/vscode-cpptools/issues/10791)
### Enhancements
* Add keyboard support for 'Inline Macro'. [#11260](https://github.com/microsoft/vscode-cpptools/issues/11260)
* Add setting `C_Cpp.refactoring.includeHeader` to customize whether or not to add an include header when doing a refactoring code action. [#11271](https://github.com/microsoft/vscode-cpptools/issues/11271)
* Improve the walkthrough wording. [#11320](https://github.com/microsoft/vscode-cpptools/issues/11320)
* Update clang-format and clang-tidy to 17. [PR #11491](https://github.com/microsoft/vscode-cpptools/pull/11491)
* Add a pre-release available notification. [PR #11569](https://github.com/microsoft/vscode-cpptools/pull/11569)
### Bug Fixes
* Fix the debugger truncating long strings when inspecting values. [#1786](https://github.com/microsoft/vscode-cpptools/issues/1786)
* Switch to using `XDG_CACHE_HOME` on Linux for the default database path. [#10191](https://github.com/microsoft/vscode-cpptools/issues/10191)
* Fix an IntelliSense error with std::is_trivially_copyable_v. [#10712](https://github.com/microsoft/vscode-cpptools/issues/10712)
* Fix incorrect status and commands with the tag parsing language status UI. [#10749](https://github.com/microsoft/vscode-cpptools/issues/10749)
* Fix an empty (`""`) `compilerPath` in a base configuration overriding the compiler specified by a custom configuration provider or a `compile_commands.json`. [#11373](https://github.com/microsoft/vscode-cpptools/issues/11373)
* Fix a startup crash when reading values from JSON (settings) that are not the type expected. [#11375](https://github.com/microsoft/vscode-cpptools/issues/11375)
* Fix a crash detected by crash telemetry. [#11401](https://github.com/microsoft/vscode-cpptools/issues/11401)
* Fix handling of an undefined `env` variable on Linux and macOS. [#11447](https://github.com/microsoft/vscode-cpptools/issues/11447)
* Fix multiple issues with querying `nvcc` (CUDA) as a compiler. [#11454](https://github.com/microsoft/vscode-cpptools/issues/11454)
* Fix an IntelliSense crash when hovering over an invalid array index expression. [#11510](https://github.com/microsoft/vscode-cpptools/issues/11510)
* Fix an issue that could cause a C language standard to be applied to a C++ file, or vice versa.
* Remove `cpp` and `clang-cpp` preprocessors from the list of detectable compilers.
* Fix an autocomplete crash bug (primarily on Mac).
## Version 1.17.5: August 28, 2023
### Bug Fixes
* Fix a language server crash for platforms that don't support the IntelliSense cache (AutoPCH). [#10789](https://github.com/microsoft/vscode-cpptools/issues/10789)
* Fix markdown in comments when inline/block code is used. [#11322](https://github.com/microsoft/vscode-cpptools/issues/11322)
* Fix Find All References and Call Hierarchy for C files when the cursor is at the end of a symbol. [#11338](https://github.com/microsoft/vscode-cpptools/issues/11338)
* Fix usage of the `/Zc:alignedNew-` MSVC compiler option. [#11350](https://github.com/microsoft/vscode-cpptools/issues/11350)
## Version 1.17.4: August 21, 2023
### Bug Fixes
* Fix crash recovery for the main extension process. [#11335](https://github.com/microsoft/vscode-cpptools/issues/11335)
* Fix an IntelliSense process crash when certain error messages occur with a language pack enabled. [#11336](https://github.com/microsoft/vscode-cpptools/issues/11336)
## Version 1.17.3: August 16, 2023
### Bug Fix
* Fix a regression with attaching the debugger to processes on Linux and macOS. [#11328](https://github.com/microsoft/vscode-cpptools/issues/11328)
## Version 1.17.2: August 14, 2023
### Enhancements
* Enable a subset of markdown to render in hover by default and a `C_Cpp.markdownInComments` setting. [#6020](https://github.com/microsoft/vscode-cpptools/issues/6020), [#10461](https://github.com/microsoft/vscode-cpptools/issues/10461)
* Add support for gcc 13 features. [#11038](https://github.com/microsoft/vscode-cpptools/issues/11038)
* Add default compiler detection of additional compilers in MSYS environments. [#11211](https://github.com/microsoft/vscode-cpptools/issues/11211)
* Use musl for building Linux binaries of the extension.
* Add support for additional compiler wrappers: gomacc, distcc, buildcache, and icecc.
### Bug Fixes
* Fix a couple bugs with documentation comments. [#5241](https://github.com/microsoft/vscode-cpptools/issues/5241)
* Added `__float128` support in gcc IntelliSense mode. [#9558](https://github.com/microsoft/vscode-cpptools/issues/9558)
* Fix an issue where the debugger would get stuck while using cl.exe options. [#10231](https://github.com/microsoft/vscode-cpptools/issues/10231)
* Fix C/C++ commands showing in the Command Palette with non-C/C++ files. [#10421](https://github.com/microsoft/vscode-cpptools/issues/10421)
* Fix the 'Select IntelliSense Configuration' command to also update an existing `compilerPath` in c_cpp_properties.json. [#10808](https://github.com/microsoft/vscode-cpptools/issues/10808)
* Update clang-format (and clang-tidy) to 16.0.6 to fix a bug. [#11027](https://github.com/microsoft/vscode-cpptools/issues/11027)
* Fix `#include` completion leaving an extra `>`. [#11042](https://github.com/microsoft/vscode-cpptools/issues/11042)
* Fix an issue with matching of glob patterns containing path delimiters. [#11132](https://github.com/microsoft/vscode-cpptools/issues/11132)
* Fix Create Declaration/Definition via `Quick Fix…` from hover tooltip. [#11157](https://github.com/microsoft/vscode-cpptools/issues/11157)
* Fix issues with compiler querying of clang-cl. [#11207](https://github.com/microsoft/vscode-cpptools/issues/11207)
* Fix `files.encoding` setting on startup. [#11210](https://github.com/microsoft/vscode-cpptools/issues/11210)
* Fix a crash related to directories with a very large number of files. [#11226](https://github.com/microsoft/vscode-cpptools/issues/11226)
* Fix the parameter format of call hierarchy items. [#11247](https://github.com/microsoft/vscode-cpptools/issues/11247)
* Remove the vcpkg code action from the missing includes code action list. [#11252](https://github.com/microsoft/vscode-cpptools/issues/11252)
* Fix the file path info of call hierarchy items to display the relative path to a workspace folder. [#11254](https://github.com/microsoft/vscode-cpptools/issues/11254)
* Fix colorization for macro expansions in macro arguments. [#11256](https://github.com/microsoft/vscode-cpptools/issues/11256)
* Fix a crash for CUDA projects with '>' in the command line. [#11289](https://github.com/microsoft/vscode-cpptools/issues/11289)
* Increase the default standard for the 'Build and Debug Active File' feature to c++14 on macOS. [#11292](https://github.com/microsoft/vscode-cpptools/issues/11292)
* Fix an issue with the compiler currently configured for use with IntelliSense being listed last in the task creation popup. [PR #11299](https://github.com/microsoft/vscode-cpptools/pull/11299)
* Fix an IPCH issue on Linux due to the Position Independent Executable (PIE) option not being set since 1.17.0.
* Fix Rank > 1 Display Strings for Natvis. [PR MIEngine#1406](https://github.com/microsoft/MIEngine/pull/1406)
* Fix some crashes identified by crash telemetry.
* Fix an issue that could cause zombie processes on Linux/Mac.
* Address some issues with glibc version compatibility. Native binaries for cpptools and the bundled clang-tidy/clang-format are now built with musl and fully statically linked.
* Fix the wrong compiler being set as default when configured to use `compile_commands.json` and overriding the compiler used there with an explicit `compilerPath`.
### Thank You to the Contributors
* [@gareth-rees (Gareth Rees)](https://github.com/gareth-rees): Always use `--simple-values` in newer versions of GDB. [PR MIEngine#1400](https://github.com/microsoft/MIEngine/pull/1400)
* [@iAbadia (Iñaki)](https://github.com/iAbadia): Align use of 'sendInvalidate' request arguments. [PR MIEngine#1402](https://github.com/microsoft/MIEngine/pull/1402)
* [@intel-rganesh (Rakesh Ganesh)](https://github.com/intel-rganesh): Introduce `--thread` and `--frame options`. [PR MIEngine#1401](https://github.com/microsoft/MIEngine/pull/1401)
* [@michalmaka (Michał Mąka)](https://github.com/michalmaka): Add support for Toybox to the remote process picker. [PR #11175](https://github.com/microsoft/vscode-cpptools/pull/11175)
* [@sbobko (Sergey Bobko)](https://github.com/sbobko): Add 'sendInvalidate' request. [PR MIEngine#1367](https://github.com/microsoft/MIEngine/pull/1367)
* [@yne (Rémy F.)](https://github.com/yne): Add wildcard support for `includePath`. [PR #10388](https://github.com/microsoft/vscode-cpptools/pull/10388)
## Version 1.16.3: June 23, 2023
### Bug Fix
* Fix "cout is ambiguous" error. [#11122](https://github.com/microsoft/vscode-cpptools/issues/11122)
@@ -87,6 +419,7 @@
* Fix the first registered configuration provider still being automatically used after a second registers. [PR #10772](https://github.com/microsoft/vscode-cpptools/pull/10772)
* Fix `C_Cpp.default.compilerPath` in the settings UI showing a string editor when it shouldn't. [#10795](https://github.com/microsoft/vscode-cpptools/issues/10795)
* Fix some issues due to usage of the spread operator not doing a deep copy. [PR #10803](https://github.com/microsoft/vscode-cpptools/pull/10803)
* Fix a deadlock with Find All References. [#10855](https://github.com/microsoft/vscode-cpptools/issues/10855)
* Fix the Code Analysis Options dropdown showing 'Resume' instead of 'Pause' after a cancel is done in a paused state. [#10879](https://github.com/microsoft/vscode-cpptools/issues/10879)
* Fix "Code Analysis Mode" not being localized when initially shown. [#10881](https://github.com/microsoft/vscode-cpptools/issues/10881)
* Fix the C/C++-related status bar items flickering off/on when switching documents. [PR #10888](https://github.com/microsoft/vscode-cpptools/pull/10888)
@@ -119,7 +452,7 @@
### New Features
* Add recursive macro expansion on hover. [#3579](https://github.com/microsoft/vscode-cpptools/issues/3579)
* Move status bar items to the language status UI. [#8405](https://github.com/microsoft/vscode-cpptools/issues/8405)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `true`.
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Add the 'Select Default Compiler' command that lets you choose a default compiler to configure IntelliSense. [#10027](https://github.com/microsoft/vscode-cpptools/issues/10027)
### Enhancements
@@ -314,12 +647,12 @@
* Fix IntelliSense with gcc vector extension types. [#6890](https://github.com/microsoft/vscode-cpptools/issues/6890)
* Fix doc comments for macros and typedefs. [#8320](https://github.com/microsoft/vscode-cpptools/issues/8320)
* Fix issue with CUDA configuration when using a custom config provider and no config is available for the file. [#8483](https://github.com/microsoft/vscode-cpptools/issues/8483)
* Fix missing logging when `C_Cpp.intelliSenseEngine` is set to `"Disabled"`. [#9277](https://github.com/microsoft/vscode-cpptools/issues/9277)
* Fix missing logging when `C_Cpp.intelliSenseEngine` is set to `Disabled`. [#9277](https://github.com/microsoft/vscode-cpptools/issues/9277)
* Fix doxygen comments not being displayed for multiple adjacent `@brief` or `@return` tags. [#9316](https://github.com/microsoft/vscode-cpptools/issues/9316)
* Fix the code analysis "disable" option not automatically clearing the disabled diagnostics. [#9364](https://github.com/microsoft/vscode-cpptools/issues/9364)
* Fix `-isystem` not being used for system headers with code analysis. [#9366](https://github.com/microsoft/vscode-cpptools/issues/9366)
* Fix compiler querying for EDG-based compilers. [#9410](https://github.com/microsoft/vscode-cpptools/issues/9410)
* Fix hiding IntelliSense dependent commands when `C_Cpp.intelliSenseEngine` is `"Disabled"`. [#9451](https://github.com/microsoft/vscode-cpptools/issues/9451)
* Fix hiding IntelliSense dependent commands when `C_Cpp.intelliSenseEngine` is `Disabled`. [#9451](https://github.com/microsoft/vscode-cpptools/issues/9451)
* Fix cl.exe build tasks not showing for .c files and .c build tasks being cached for .cpp files (and vice versa). [PR #9544](https://github.com/microsoft/vscode-cpptools/pull/9544)
* Fix code analysis not detecting warnings with relative paths. [#9555](https://github.com/microsoft/vscode-cpptools/issues/9555)
* Fix `--header-filter` being used with clang-tidy when it shouldn't when a .clang-tidy file exists. [#9566](https://github.com/microsoft/vscode-cpptools/issues/9566)
@@ -346,7 +679,7 @@
## Version 1.10.6: June 14, 2022
### Bug Fixes
* Fix `@responseFile` in `compilerArgs` not being handled on Linux/Mac. [#9434](https://github.com/microsoft/vscode-cpptools/issues/9434)
* Fix debug preLaunchTask not working when `C_Cpp.intelliSenseEngine` is `"Disabled"`. [#9446](https://github.com/microsoft/vscode-cpptools/issues/9446)
* Fix debug preLaunchTask not working when `C_Cpp.intelliSenseEngine` is `Disabled`. [#9446](https://github.com/microsoft/vscode-cpptools/issues/9446)
* Make the `C_Cpp.legacyCompilerArgsBehavior` setting non-deprecated.
## Version 1.10.5: June 8, 2022
@@ -395,7 +728,7 @@
## Version 1.9.7: March 23, 2022
### New Features
* Add debugger support for Apple M1 (osx-arm64). [#7035](https://github.com/microsoft/vscode-cpptools/issues/7035)
* Resolves issue "[Big Sur M1] ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))". [#6779](https://github.com/microsoft/vscode-cpptools/issues/6779)
* Resolves issue "[Big Sur M1] ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))". [#6779](https://github.com/microsoft/vscode-cpptools/issues/6779)
* Add a build and debug button when `C_Cpp.debugShortcut` is `true`. [#7497](https://github.com/microsoft/vscode-cpptools/issues/7497)
* The "Build and Debug Active File" command has been split into "Debug C++ File" and "Run C++ File", and it has been removed from the context menu.
* Add Alpine Linux arm64 support (VSIX).
@@ -404,7 +737,7 @@
### Enhancements
* Reserved identifiers with characters that match typed characters in the correct order but not contiguously are initially filtered in the auto-completion list. Doing a `ctrl` + `space` in the same location will show all auto-complete suggestions. [#4939](https://github.com/microsoft/vscode-cpptools/issues/4939)
* Add `dotConfig` property to IntelliSense Configuration (c_cpp_properties.json) to use .config file created by Kconfig system.
* Matheus Castello (@microhobby) [PR #7845](https://github.com/microsoft/vscode-cpptools/pull/7845)
* Matheus Castello (@microhobby) [PR #7845](https://github.com/microsoft/vscode-cpptools/pull/7845)
* Rework how cancelation is processed for semantic tokens and folding operations. [PR #8739](https://github.com/microsoft/vscode-cpptools/pull/8739)
* Make SwitchHeaderSource use the `workbench.editor.revealIfOpen` setting.
* Joel Smith (@joelmsmith) [PR #8857](https://github.com/microsoft/vscode-cpptools/pull/8857)
@@ -604,7 +937,7 @@
* Add auto-detection of clang compilers on Windows (and different versions of cl.exe). [#6718](https://github.com/microsoft/vscode-cpptools/issues/6718)
* Stop adding .cu files to `files.associations` (switch to using setTextDocumentLanguage). [#7359](https://github.com/microsoft/vscode-cpptools/issues/7359)
* Add "Symbol Options" for CppVsdbg to configure symbol settings [PR #7680](https://github.com/microsoft/vscode-cpptools/pull/7680)
* Update CppVsdbg to use newer CppEE and msdia.
* Update CppVsdbg to use newer CppEE and msdia.
### Bug Fixes
* Fix switch header/source not checking `files.exclude`. [#4429](https://github.com/microsoft/vscode-cpptools/issues/4429)
@@ -631,7 +964,7 @@
* Fix `Build and Debug Active File` for certain file extensions (.cu, .cp, etc.).
* jogo- (@jogo-) [PR #7726](https://github.com/microsoft/vscode-cpptools/pull/7726)
* Fix `browse.path` being incorrect if an invalid `compileCommands` is set. [#7737](https://github.com/microsoft/vscode-cpptools/issues/7737)
* Fix an incorrect error message when `C_Cpp.errorSquiggles` is `"Enabled"`. [#7744](https://github.com/microsoft/vscode-cpptools/issues/7744)
* Fix an incorrect error message when `C_Cpp.errorSquiggles` is `Enabled`. [#7744](https://github.com/microsoft/vscode-cpptools/issues/7744)
* Fix compiler querying sometimes not working with Cygwin. [#7751](https://github.com/microsoft/vscode-cpptools/issues/7751)
* Fix a duplicate IntelliSense update when a new C/C++ file is opened and after switching from a non-C/C++ file and back.
* Fix a potential IntelliSense process crash on shutdown.
@@ -650,7 +983,7 @@
* Add `private` or `protected` scope labels to class symbols. [#7120](https://github.com/microsoft/vscode-cpptools/issues/7120)
* Fix file:line path for $FILEPOS [#7193](https://github.com/microsoft/vscode-cpptools/issues/7193)
* [PR MIEngine#1124](https://github.com/microsoft/MIEngine/pull/1124)
* Add `stopAtConnect` and `hardwareBreakpoints` launch options [PR #7449](https://github.com/microsoft/vscode-cpptools/pull/7449)
* Add `stopAtConnect` and `hardwareBreakpoints` launch options [PR #7449](https://github.com/microsoft/vscode-cpptools/pull/7449)
* `stopAtConnect` stops the debugger on connection to a remote target [PR MIEngine#1109](https://github.com/microsoft/MIEngine/pull/1109)
* `hardwareBreakpoints` controls usage and number of remote hardware breakpoints [PR MIEngine#1128](https://github.com/microsoft/MIEngine/pull/1128)
* Add support for loading Concord extensions to the cppvsdbg debug adapter (see [documentation](https://github.com/microsoft/ConcordExtensibilitySamples/wiki/Support-for-VS-Code-cppvsdbg-Scenarios) for more information)
@@ -842,7 +1175,7 @@
* Fix compiler querying with compilers that do not output `__STD_VERSION__` by default (gcc <= 4.8.x). [#6792](https://github.com/microsoft/vscode-cpptools/issues/6792)
* Fix document symbols when nested symbols have the same name as a parent. [#6830](https://github.com/microsoft/vscode-cpptools/issues/6830)
* Fix automatic adding of header files to `files.associations` after `Go to Definition` on a `#include`. [#6845](https://github.com/microsoft/vscode-cpptools/issues/6845)
* Fix `"Insiders"` `updateChannel` for VS Code - Exploration. [#6875](https://github.com/microsoft/vscode-cpptools/issues/6875)
* Fix `Insiders` `updateChannel` for VS Code - Exploration. [#6875](https://github.com/microsoft/vscode-cpptools/issues/6875)
* Fix "D" command line warnings not appearing with cl.exe cppbuild build tasks.
* Fix cl.exe cppbuild tasks when `/nologo` is used (and make /nologo a default arg).
* Fix a cpptools crash and multiple deadlocks.
@@ -883,7 +1216,7 @@
* YuTengjing (@tjx666) [PR #6344](https://github.com/microsoft/vscode-cpptools/pull/6344)
* Enable support for specifying a compiler by only the filename if it's in the environment path. [#6179](https://github.com/microsoft/vscode-cpptools/issues/6179)
* Restart the IntelliSense process if its memory usage exceeds the `C_Cpp.intelliSenseMemoryLimit` setting. [#6230](https://github.com/microsoft/vscode-cpptools/issues/6230)
* [cppdbg] Stepping out of a function will display '$ReturnValue'.
* [cppdbg] Stepping out of a function will display '$ReturnValue'.
* @Trass3r [PR MIEngine#1036](https://github.com/microsoft/MIEngine/pull/1036)
* [cppdbg] Support composite expressions in natvis ArrayItems
* @Trass3r [PR MIEngine#1044](https://github.com/microsoft/MIEngine/pull/1044)
@@ -1193,7 +1526,7 @@
* Fix `launch.json` creation due to localized strings containing quotes. [#4526](https://github.com/microsoft/vscode-cpptools/issues/4526)
* Fix configuration error squiggles not being applied unless the setting was set in both `c_cpp_properties.json` and `settings.json`. [PR #4538](https://github.com/microsoft/vscode-cpptools/pull/4538)
* Fix document symbol for Outline view and breadcrumbs on Windows 7. [#4536](https://github.com/microsoft/vscode-cpptools/issues/4536)
* Add support for `"ms-vscode.cmake-tools"` `configurationProvider` id. [#4586](https://github.com/microsoft/vscode-cpptools/issues/4586)
* Add support for `ms-vscode.cmake-tools` `configurationProvider` id. [#4586](https://github.com/microsoft/vscode-cpptools/issues/4586)
* Fix cancellation of Find All References sometimes resulting in an exception. [#2710](https://github.com/microsoft/vscode-cpptools/issues/2710)
* Fix the sort order of files in the Find All References and Rename UI's. [#4615](https://github.com/microsoft/vscode-cpptools/issues/4615)
* Fix localized Chinese strings not displaying on systems with case-sensitive file systems. [#4619](https://github.com/microsoft/vscode-cpptools/issues/4619)
@@ -1264,7 +1597,7 @@
* Add a code action for resolving missing includes via the `vcpkg` dependency manager. [PR #3791](https://github.com/microsoft/vscode-cpptools/pull/3791)
### Enhancements
* Added support for compile commands:
* Added support for compile commands:
* `-iquote`. [#2088](https://github.com/microsoft/vscode-cpptools/issues/2088)
* `-imacros`. [#2417](https://github.com/microsoft/vscode-cpptools/issues/2417)
* `-idirafter`(`--include-directory-after` & `--include-directory-after=`). [#3713](https://github.com/microsoft/vscode-cpptools/issues/3713)
@@ -1347,7 +1680,7 @@
## Version 0.23.1: May 13, 2019
### Bug Fixes
* Fix `launch.json` creation when `intelliSenseEngine` is `"Disabled"`. [#3583](https://github.com/microsoft/vscode-cpptools/issues/3583)
* Fix `launch.json` creation when `intelliSenseEngine` is `Disabled`. [#3583](https://github.com/microsoft/vscode-cpptools/issues/3583)
* Fix C/C++ commands not working if the language service isn't activated. [#3615](https://github.com/microsoft/vscode-cpptools/issues/3615)
* Fix missing extension `"Details"` page. [#3621](https://github.com/microsoft/vscode-cpptools/issues/3621)
* Fix some random crashes related to IntelliSense inactive region processing.
@@ -1485,7 +1818,7 @@
* Fix problem with empty recursive include paths. [#2855](https://github.com/Microsoft/vscode-cpptools/issues/2855)
* Fix `NullReferenceException` on debugger launch with VS Code Insiders. [#2858](https://github.com/Microsoft/vscode-cpptools/issues/2858), [PR Microsoft/MIEngine#810](https://github.com/Microsoft/MIEngine/pull/810)
* Fix IntelliSense errors with template argument deduction. [#2907](https://github.com/Microsoft/vscode-cpptools/issues/2907), [#2912](https://github.com/Microsoft/vscode-cpptools/issues/2912)
* Retry Insider VSIX downloading with `http.proxySupport` `"off"`. [#2927](https://github.com/Microsoft/vscode-cpptools/issues/2927)
* Retry Insider VSIX downloading with `http.proxySupport` `off`. [#2927](https://github.com/Microsoft/vscode-cpptools/issues/2927)
* Fix snippet completions being offered when they shouldn't be. [#2942](https://github.com/Microsoft/vscode-cpptools/issues/2942)
* Set the `editor.wordBasedSuggestions` to `false` by default to prevent incorrect completions. [#2943](https://github.com/Microsoft/vscode-cpptools/issues/2943)
* Fix IntelliSense-based `Go to Definition` for functions with function pointer parameters. [#2981](https://github.com/Microsoft/vscode-cpptools/issues/2981)
@@ -2041,4 +2374,3 @@
## Version 0.5.0: April 14, 2016
* Usability and correctness bug fixes.
* Simplify installation experience.
* Usability and correctness bug fixes.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -4,13 +4,13 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1941",
"--pack_alignment",
"8",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1941",
"-D_MSC_FULL_VER=194134120",
"-D_MSC_BUILD=0",
"-D_M_ARM=7"
],
"defaults_op": "merge"
}
}
+4 -4
View File
@@ -4,14 +4,14 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1941",
"--pack_alignment",
"8",
"-D_CPPUNWIND=1",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1941",
"-D_MSC_FULL_VER=194134120",
"-D_MSC_BUILD=0",
"-D_M_ARM64=1"
],
"defaults_op": "merge"
}
}
+18 -18
View File
@@ -1,18 +1,18 @@
{
"defaults": [
"-D_MSC_EXTENSIONS",
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"--pack_alignment",
"8",
"-D_CPPUNWIND=1",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_BUILD=0",
"-D_M_X64=100",
"-D_M_AMD64=100"
],
"defaults_op": "merge"
}
{
"defaults": [
"-D_MSC_EXTENSIONS",
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1941",
"--pack_alignment",
"8",
"-D_CPPUNWIND=1",
"-D_MSC_VER=1941",
"-D_MSC_FULL_VER=194134120",
"-D_MSC_BUILD=0",
"-D_M_X64=100",
"-D_M_AMD64=100"
],
"defaults_op": "merge"
}
+17 -17
View File
@@ -1,17 +1,17 @@
{
"defaults": [
"-D_MSC_EXTENSIONS",
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"--pack_alignment",
"8",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_BUILD=0",
"-D_M_IX86=600",
"-D_M_IX86_FP=2"
],
"defaults_op": "merge"
}
{
"defaults": [
"-D_MSC_EXTENSIONS",
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1941",
"--pack_alignment",
"8",
"-D_MSC_VER=1941",
"-D_MSC_FULL_VER=194134120",
"-D_MSC_BUILD=0",
"-D_M_IX86=600",
"-D_M_IX86_FP=2"
],
"defaults_op": "merge"
}
+4 -1
View File
@@ -18,7 +18,10 @@
"compilerPath": {
"markdownDescription": "Full path of the compiler being used, e.g. `/usr/bin/gcc`, to enable more accurate IntelliSense.",
"descriptionHint": "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered.",
"type": "string"
"type": [
"string",
"null"
]
},
"compilerArgs": {
"markdownDescription": "Compiler arguments to modify the includes or defines used, e.g. `-nostdinc++`, `-m32`, etc. Arguments that take additional space-delimited arguments should be entered as separate arguments in the array, e.g. for `--sysroot <arg>` use `\"--sysroot\", \"<arg>\"`.",
+21 -157
View File
@@ -6,7 +6,7 @@
'use strict';
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const fs = require('fs');
const nls = require('vscode-nls-dev');
const path = require('path');
@@ -58,24 +58,6 @@ const languages = [
{ id: "pl", folderName: "plk" }
];
/// Misc Tasks
const allTypeScript = [
'src/**/*.ts',
'!**/*.d.ts',
'!**/typings**'
];
gulp.task('lint', function () {
return gulp.src(allTypeScript)
.pipe(eslint({ configFile: ".eslintrc.js" }))
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('copy-walkthrough-media', function () {
return gulp.src('walkthrough/images/**/*')
.pipe(gulp.dest('dist/walkthrough/images'));
});
// ****************************
// Command: translations-export
@@ -248,25 +230,25 @@ gulp.task("translations-export", (done) => {
// Merge files from all source streams
es.merge(jsStream, htmlStream, jsonSchemaStream)
// Filter down to only the files we need
.pipe(filter(['**/*.nls.json', '**/*.nls.metadata.json']))
// Filter down to only the files we need
.pipe(filter(['**/*.nls.json', '**/*.nls.metadata.json']))
// Consoldate them into nls.metadata.json, which the xlf is built from.
.pipe(nls.bundleMetaDataFiles('ms-vscode.cpptools', '.'))
// Consoldate them into nls.metadata.json, which the xlf is built from.
.pipe(nls.bundleMetaDataFiles('ms-vscode.cpptools', '.'))
// filter down to just the resulting metadata files
.pipe(filter(['**/nls.metadata.header.json', '**/nls.metadata.json']))
// filter down to just the resulting metadata files
.pipe(filter(['**/nls.metadata.header.json', '**/nls.metadata.json']))
// Add package.nls.json, used to localized package.json
.pipe(gulp.src(["package.nls.json"]))
// Add package.nls.json, used to localized package.json
.pipe(gulp.src(["package.nls.json"]))
// package.nls.json and nls.metadata.json are used to generate the xlf file
// Does not re-queue any files to the stream. Outputs only the XLF file
.pipe(nls.createXlfFiles(translationProjectName, translationExtensionName))
.pipe(gulp.dest(path.join("..", `${translationProjectName}-localization-export`)))
.pipe(es.wait(() => {
done();
}));
// package.nls.json and nls.metadata.json are used to generate the xlf file
// Does not re-queue any files to the stream. Outputs only the XLF file
.pipe(nls.createXlfFiles(translationProjectName, translationExtensionName))
.pipe(gulp.dest(path.join("..", `${translationProjectName}-localization-export`)))
.pipe(es.wait(() => {
done();
}));
});
@@ -288,11 +270,12 @@ gulp.task("translations-import", (done) => {
let id = language.transifexId || language.id;
return gulp.src(path.join(options.location, id, translationProjectName, `${translationExtensionName}.xlf`))
.pipe(nls.prepareJsonFiles())
.pipe(gulp.dest(path.join("./i18n", language.folderName)));
.pipe(gulp.dest(path.join("./i18n", language.folderName)))
.pipe(es.wait()); // This is required or it gives `this.pipeTo.end is not a function`.
}))
.pipe(es.wait(() => {
done();
}));
.pipe(es.wait(() => {
done();
}));
});
// ****************************
@@ -462,122 +445,3 @@ const generateJsonSchemaLoc = () => {
gulp.task('translations-generate', gulp.series(generateSrcLocBundle, generateAdditionalLocFiles, generateHtmlLoc, generateWalkthroughHtmlLoc, generateJsonSchemaLoc));
// ****************************
// Command: generate-native-strings
// The following is used to generate nativeStrings.ts and localized_string_ids.h from ./src/nativeStrings.json
// If adding localized strings to the native side, start by adding it to nativeStrings.json and use this to generate the others.
// ****************************
// A gulp task to parse ./src/nativeStrings.json and generate nativeStrings.ts, and localized_string_ids.h
gulp.task("generate-native-strings", (done) => {
const stringTable = jsonc.parse(fs.readFileSync('./src/nativeStrings.json').toString());
let nativeEnumContent = ""
let nativeStringTableContent = "";
let typeScriptSwitchContent = "";
let stringIndex = 1;
for (let property in stringTable) {
let stringValue = stringTable[property];
let hintValue;
if (typeof stringValue !== "string") {
hintValue = stringValue.hint;
stringValue = stringValue.text;
}
// Add to native enum
nativeEnumContent += ` ${property} = ${stringIndex},\n`;
// Add to native string table
nativeStringTableContent += ` ${JSON.stringify(stringValue)},\n`;
// Add to TypeScript switch
// Skip empty strings, which can be used to prevent enum/index reordering
if (stringValue != "") {
// It's possible that a translation may skip "{#}" entries, so check for up to 50 of them.
let numArgs = 0;
for (let i = 0; i < 50; i++) {
if (stringValue.includes(`{${i}}`)) {
numArgs = i + 1;
}
}
typeScriptSwitchContent += ` case ${stringIndex}:\n`;
if (numArgs != 0) {
typeScriptSwitchContent += ` if (stringArgs) {\n`;
if (hintValue) {
typeScriptSwitchContent += ` message = localize({ key: ${JSON.stringify(property)}, comment: [${JSON.stringify(hintValue)}] }, ${JSON.stringify(stringValue)}`;
} else {
typeScriptSwitchContent += ` message = localize(${JSON.stringify(property)}, ${JSON.stringify(stringValue)}`;
}
for (let i = 0; i < numArgs; i++) {
typeScriptSwitchContent += `, stringArgs[${i}]`;
}
typeScriptSwitchContent += `);\n break;\n }\n`;
}
if (hintValue) {
typeScriptSwitchContent += ` message = localize({ key: ${JSON.stringify(property)}, comment: [${JSON.stringify(hintValue)}] }, ${JSON.stringify(stringValue)}`;
} else {
typeScriptSwitchContent += ` message = localize(${JSON.stringify(property)}, ${JSON.stringify(stringValue)}`;
}
typeScriptSwitchContent += `);\n break;\n`;
}
++stringIndex;
};
let typeScriptContent = `/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
// ****** This file is generated from nativeStrings.json. Do not edit this file directly. ******
'use strict';
import * as nls from 'vscode-nls';
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export const localizedStringCount: number = ${stringIndex};
export function lookupString(stringId: number, stringArgs?: string[]): string {
let message: string = "";
switch (stringId) {
case 0:
// Special case for blank string
break;
${typeScriptSwitchContent}
default:
console.assert(\"Unrecognized string ID\");
break;
}
return message;
}
`;
console.log("Writing file: ./src/nativeStrings.ts");
fs.writeFileSync("./src/nativeStrings.ts", typeScriptContent, 'utf8');
let nativeContents = `/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
// ****** This file is generated from nativeStrings.json. Do not edit this file directly. ******
#pragma once
// NOLINTBEGIN(modernize-raw-string-literal)
enum class localized_string_id : unsigned int
{
blank = 0,
${nativeEnumContent}};
inline static const char *localizable_strings[] = {
"",
${nativeStringTableContent}};
// NOLINTEND(modernize-raw-string-literal)
`;
console.log("Writing file: localized_string_ids.h -- If changed, copy to VS repo: src/vc/designtime/vscode/Common/generated/");
fs.writeFileSync("localized_string_ids.h", nativeContents, 'utf8');
done();
});
+27 -8
View File
@@ -16,8 +16,8 @@
"c_cpp.command.configurationProviderSelect.title": "更改配置提供程序...",
"c_cpp.command.configurationEditJSON.title": "编辑配置(JSON)",
"c_cpp.command.configurationEditUI.title": "编辑配置(UI)",
"c_cpp.command.selectDefaultCompiler.title": "选择默认编译器...",
"c_cpp.command.selectIntelliSenseConfiguration.title": "选择 IntelliSense 配置...",
"c_cpp.command.installCompiler.title": "安装 C++ 编译器",
"c_cpp.command.rescanCompilers.title": "重新扫描编译器",
"c_cpp.command.switchHeaderSource.title": "切换标头/源",
"c_cpp.command.enableErrorSquiggles.title": "启用错误波形曲线",
@@ -56,6 +56,7 @@
"c_cpp.configuration.maxConcurrentThreads.markdownDescription": "用于语言服务处理的最大并发线程数。该值是一个提示,且不能始终使用。默认值 `null` (空)使用可用的逻辑处理器数。",
"c_cpp.configuration.maxCachedProcesses.markdownDescription": "用于语言服务处理的最大缓存进程数。默认值 `null` (空)使用可用逻辑处理器数的两倍。",
"c_cpp.configuration.maxMemory.markdownDescription": "可用于语言服务处理的最大内存(以 MB 为单位)。超过此内存使用量后,将缓存且并发运行较少的进程。默认值 `null` (空)使用系统的空闲内存。",
"c_cpp.configuration.maxSymbolSearchResults.markdownDescription": "要为“转到工作区中的符号”显示的最大结果数。默认设置为 `5000`。",
"c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": "要继续运行的最大 IntelliSense 进程数。默认值 `null` (空)使用从 `#C_Cpp.maxCachedProcesses#` 继承的值。",
"c_cpp.configuration.intelliSense.maxMemory.markdownDescription": "超过此内存使用量(以 MB 为单位)后,在创建新进程之前,旧的 IntelliSense 进程将关闭。默认值 `null` (空)使用从 `#C_Cpp.maxMemory#` 继承的值。",
"c_cpp.configuration.references.maxConcurrentThreads.markdownDescription": "用于“查找所有引用”和“重命名”的最大并发线程数。默认值 `null` (空)使用从 `#C_Cpp.maxConcurrentThreads#` 继承的值。",
@@ -184,7 +185,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "提供非上下文感知的“模糊”结果。",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "关闭 C/C++ 语言服务功能。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "控制 IntelliSense 引擎是否将自动切换为包含 `#include` 错误的翻译单元的标记分析器。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自动完成提供程序。如果 `disabled`,且你想要基于字词的补全,则还需要设置 `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}`(对 `c` 和 `cuda-cpp` 语言同样执行此操作)。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自动完成提供程序。如果 `disabled`,且你想要基于字词的补全功能,则还需要设置 `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (`c` 和 `cuda-cpp` 语音也类似)。",
"c_cpp.configuration.autocomplete.default.description": "使用活动的 IntelliSense 引擎。",
"c_cpp.configuration.autocomplete.disabled.description": "使用 Visual Studio Code 提供的基于字词的补全。",
"c_cpp.configuration.errorSquiggles.description": "控制是否将 IntelliSense 引擎检测到的可疑编译错误报告回编辑器。还控制是否报告代码分析警告(如果找不到包含)。标记分析器引擎将忽略此设置。",
@@ -247,6 +248,10 @@
"c_cpp.configuration.caseSensitiveFileSupport.markdownDescription": "如果设置为 `default`,则假定工作区的文件系统在 Windows 上不区分大小写,在 macOS 或 Linux 上区分大小写。如果设置为 `enabled`,则假定工作区的文件系统在 Windows 上区分大小写。",
"c_cpp.configuration.enhancedColorization.markdownDescription": "如果启用,则根据 IntelliSense 对代码进行着色。仅当 `#C_Cpp.intelliSenseEngine#` 设置为 `default` 时,此设置才适用。",
"c_cpp.configuration.codeFolding.description": "如果启用,则由语言服务器提供代码折叠范围。",
"c_cpp.configuration.markdownInComments.description": "选择 Markdown 是否在悬停工具提示中可用。默认情况下,仅一部分 markdown 将应用于悬停工具提示中的注释。",
"c_cpp.configuration.markdownInComments.subsetEnabled.description": "启用悬停工具提示中的所有 Markdown 功能,但包含“_”和“*”字符的功能除外。",
"c_cpp.configuration.markdownInComments.enabled.description": "在悬停工具提示中启用所有 Markdown 功能。",
"c_cpp.configuration.markdownInComments.disabled.description": "禁用悬停工具提示中的所有 Markdown 功能。",
"c_cpp.configuration.hover.description": "如果禁用,则语言服务器不再提供悬停详细信息。",
"c_cpp.configuration.vcpkg.enabled.markdownDescription": "为 [vcpkg 依存关系管理器](https://aka.ms/vcpkg/) 启用集成服务。",
"c_cpp.configuration.addNodeAddonIncludePaths.markdownDescription": "当来自 `nan` 和 `node-addon-api` 的包含路径为依赖项时,请将其添加。",
@@ -369,6 +374,11 @@
"c_cpp.taskDefinitions.name.description": "任务名称。",
"c_cpp.taskDefinitions.command.description": "执行编译的编译器或脚本的路径。",
"c_cpp.taskDefinitions.args.description": "其他要传递给编译器或编译脚本的参数。",
"c_cpp.taskDefinitions.args.value.description": "实际参数值。",
"c_cpp.taskDefinitions.args.quoting.description": "参数值应该如何引用。",
"c_cpp.taskDefinitions.args.quoting.escape.description": "使用 Shell 的转义字符来转义字符 (如 bash 下的 \\)。",
"c_cpp.taskDefinitions.args.quoting.strong.description": "使用 Shell 的强引用字符来引用参数(例如在 bash 下的 ')。",
"c_cpp.taskDefinitions.args.quoting.weak.description": "使用 Shell 的弱引用字符来引用参数(例如在 bash 下的 \")。",
"c_cpp.taskDefinitions.options.description": "其他命令选项。",
"c_cpp.taskDefinitions.options.cwd.description": "已执行程序或脚本的当前工作目录。如果省略,则使用代码的当前工作区根。",
"c_cpp.taskDefinitions.detail.description": "任务的其他详细信息。",
@@ -412,8 +422,9 @@
"c_cpp.walkthrough.description": "深入了解 VS Code 丰富的 C++ 开发体验。",
"c_cpp.walkthrough.set.up.title": "设置 C++ 环境",
"c_cpp.walkthrough.activating.description": "激活 C++ 扩展以确定是否已设置 C++ 环境。\n正在激活扩展...",
"c_cpp.walkthrough.no.compilers.description": "无法在计算机上找到 C++ 编译器,这是使用 C++ 扩展所必需的。请按照右侧的说明安装一个编译器,然后单击下面的“查找我的新编译器”。\n[查找我的新编译器](command:C_Cpp.RescanCompilers?%7B%22sender%22%3A%22walkthrough%22%7D)",
"c_cpp.walkthrough.compilers.found.description": "C++ 扩展需要与 C++ 编译器一起使用。通过单击下面的按钮从计算机上已有的编译器中选择一个。\n[选择我的默认编译器](command:C_Cpp.SelectDefaultCompiler?%7B%22sender%22%3A%22walkthrough%22%7D)",
"c_cpp.walkthrough.no.compilers.windows.description": "无法在计算机上找到 C++ 编译器,这是使用 C++ 扩展所必需的。请按照右侧的说明安装一个编译器,然后单击下面的“查找我的新编译器”。\n[查找我的新编译器](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.no.compilers.description": "在你的计算机上找不到 C++ 编译器,而使用 C++ 扩展需要该编译器。请选择“安装 C++ 编译器”,为你安装编译器,或者按照右侧的说明安装编译器,然后单击下面的“查找我的新编译器”。\n[安装 C++ 编译器](command:C_Cpp.InstallCompiler?%22walkthrough%22)\n[查找我的新编译器](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.compilers.found.description": "C++ 扩展需要与 C++ 编译器一起使用。通过点击下面的按钮从机器上已有的编译器中选择一个。\n[选择我的默认编译器](command:C_Cpp.SelectIntelliSenseConfiguration?%22walkthrough%22)",
"c_cpp.walkthrough.compilers.found.altText": "显示在用户计算机上找到的选定默认编译器快捷检查和编译器列表的图像,其中一个已选定。",
"c_cpp.walkthrough.create.cpp.file.title": "创建 C++ 文件",
"c_cpp.walkthrough.create.cpp.file.description": "[打开](command:toSide:workbench.action.files.openFile)或[创建](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22cpp%22%7D)一个 C++ 文件。请确保将其保存为 \".cpp\" 扩展名,例如 \"helloworld.cpp\"。\n[创建 C++ 文件](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22cpp%22%7D)",
@@ -426,8 +437,16 @@
"c_cpp.walkthrough.run.debug.windows.description": "打开你的 C++ 文件,然后在编辑器右上角点击播放按钮,或者当你在该文件上时按下 F5。选择“cl.exe - 构建和调试活动文件”以使用调试器运行。",
"c_cpp.walkthrough.run.debug.windows.altText": "显示 C++ 文件中的断点、f5 按钮和右上角的运行符号的图像",
"c_cpp.walkthrough.customize.debugging.title": "自定义调试",
"c_cpp.walkthrough.customize.debugging.mac.description": "可以通过在播放按钮右侧选择“添加调试配置”来自定义调试配置(例如,在运行时传递参数给程序)。自定义调试配置将保存项目的 launch.json 文件中。\n[了解更多](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.linux.description": "可以通过在播放按钮右侧选择“添加调试配置”来自定义调试配置(例如,在运行时传递参数给程序)。自定义调试配置将保存项目的 launch.json 文件中。\n[了解更多](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.windows.description": "可以通过在播放按钮右侧选择“添加调试配置”来自定义调试配置(例如,在运行时传递参数给程序)。自定义的调试配置将保存项目的 launch.json 文件中。\n[了解更多](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.altText": "显示下拉列表中“添加调试配置”的图像"
"c_cpp.walkthrough.customize.debugging.mac.description": "若要自定义调试配置,请在活动栏中选择“资源管理器”,然后打开包含 C++ 文件的文件夹。打开 C++ 文件,然后选择播放按钮右侧“添加调试配置”。新的调试配置将保存项目的 launch.json 文件中。\n[了解详细信息](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.linux.description": "若要自定义调试配置,请在活动栏中选择“资源管理器”,然后打开包含 C++ 文件的文件夹。打开 C++ 文件,然后选择播放按钮右侧“添加调试配置”。新的调试配置将保存项目的 launch.json 文件中。\n[了解详细信息](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.windows.description": "若要自定义调试配置,请在活动栏中选择“资源管理器”,然后打开包含 C++ 文件的文件夹。打开 C++ 文件,然后选择播放按钮右侧“添加调试配置”。新的调试配置将保存项目的 launch.json 文件中。\n[了解详细信息](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.altText": "显示下拉列表中“添加调试配置”的图像",
"c_cpp.codeActions.refactor.inline.macro.title": "内联宏",
"c_cpp.codeActions.refactor.inline.macro.description": "将宏调用替换为展开的代码。",
"c_cpp.codeActions.refactor.extract.function.title": "提取到函数",
"c_cpp.codeActions.refactor.extract.function.description": "将所选代码提取到自由函数或成员函数。",
"c_cpp.configuration.refactoring.includeHeader.markdownDescription": "控制在执行重构操作(例如创建声明/定义)时是否将已重构的函数/符号的头文件包含在其相应的源文件。",
"c_cpp.configuration.refactoring.includeHeader.always.description": "如果头文件未显式包含在源文件中,则始终包含该头文件。",
"c_cpp.configuration.refactoring.includeHeader.ifNeeded.description": "仅当头文件未显式包含在源文件中或通过隐式包含来包含在内时,才包含该头文件。",
"c_cpp.configuration.refactoring.includeHeader.never.description": "从不包含头文件。"
}
@@ -4,5 +4,5 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"ignoring.lines.in.envfile": "忽略 {0} {1} 中不可分析的行:"
"ignoring.lines.in.envfile": "忽略 {0} {1} 中不可分析的行: "
}
@@ -14,5 +14,5 @@
"select.ssh.config.file": "选择 SSH 配置文件",
"yes": "是",
"no": "否",
"ssh.target.delete.confirmation": "是否确要永久删除“{0}”?"
"ssh.target.delete.confirmation": "是否确要永久删除“{0}”?"
}
@@ -0,0 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"expands.to": "扩展到:",
"inline.macro": "内联宏",
"inline.macro.not.available": "内联宏在此位置不可用。"
}
@@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"unable.to.start": "无法启动 C/C++ 语言服务器。IntelliSense 功能将被禁用。错误: {0}",
"check.permissions": "EPERM: 检查“{0}”的权限",
"select.compiler": "选择要为 IntelliSense 配置的编译器",
"configure.intelliSense.forFolder": "你希望如何为“{0}”文件夹配置 IntelliSense?",
"configure.intelliSense.thisFolder": "你希望如何为此文件夹配置 IntelliSense?",
@@ -13,42 +11,31 @@
"use.compiler": "使用 {0}",
"configuration.providers": "配置提供程序",
"compilers": "编译器",
"setCompiler.message": "未配置编译器。除非设置自己的配置,否则 IntelliSense 可能无法正常工作。",
"selectIntelliSenseConfiguration.string": "选择 IntelliSense 配置...",
"setCompiler.message": "未配置编译器。除非设置自己的配置,否则 IntelliSense 可能无法正常工作。",
"use.provider": "使用 {0}",
"use.compileCommands": "使用 {0}",
"selectAnotherCompiler.string": "在我的计算机上选择另一个编译器...",
"installCompiler.string": "帮助我安装编译器",
"installCompiler.string.nix": "安装编译器",
"noConfig.string": "请勿适用编译器进行配置(不推荐)",
"selectCompiler.string": "选择编译器",
"confirmCompiler.string": "是",
"selectCompiler.message": "已找到编译器 {0}。是否要使用此编译器配置 IntelliSense?",
"check.permissions": "EPERM: 检查“{0}”的权限",
"unable.to.start": "无法启动 C/C++ 语言服务器。IntelliSense 功能将被禁用。错误: {0}",
"server.crashed.restart": "语言服务器崩溃。正在重新启动...",
"server.crashed2": "在过去 3 分钟内,语言服务器崩溃了 5 次。它不会重新启动。",
"loggingLevel.changed": "{0} 已更改为: {1}",
"dismiss.button": "消除",
"diable.warnings.button": "禁用警告",
"disable.warnings.button": "禁用警告",
"unable.to.provide.configuration": "{0} 无法为“{1}”提供 IntelliSense 配置信息。将改为使用“{2}”配置中的设置。",
"config.not.found": "找不到请求的配置名称: {0}",
"unsupported.client": "不支持的客户端",
"timed.out": "将在 {0} 毫秒后超时。",
"update.intellisense.time": "更新 IntelliSense 时间(秒): {0}",
"configure.json.button": "配置(JSON)",
"configure.ui.button": "配置(UI)",
"dont.show.again": "不再显示",
"update.your.intellisense.settings": "更新 IntelliSense 设置或使用 Vcpkg 来安装用于帮助查找缺少的标头的库。",
"configure.your.intellisense.settings": "配置 IntelliSense 设置以帮助查找缺少的标头。",
"provider.configure.folder": "{0} 想要为“{1}”文件夹配置 IntelliSense。",
"provider.configure.this.folder": "{0} 想要为此文件夹配置 IntelliSense。",
"allow.button": "允许",
"dont.allow.button": "不允许",
"ask.me.later.button": "稍后询问我",
"a.compile.commands.file": "compile_commands.json 文件",
"auto-configure.intellisense.folder": "是否要使用 {0} 为“{1}”文件夹自动配置 IntelliSense?",
"auto-configure.intellisense.this.folder": "是否要使用 {0} 为此文件夹自动配置 IntelliSense?",
"yes.button": "是",
"no.button": "否",
"configurations.received": "已收到自定义配置:",
"browse.configuration.received": "已收到自定义浏览配置: {0}",
"fallback.clipboard": "已复制声明/定义。"
"fallback.clipboard": "已复制声明/定义。",
"handle.extract.name": "为提取的函数命名",
"handle.extract.new.function": "NewFunction",
"handle.extract.error": "未能提取到函数: {0}",
"invalid.edit": "未能提取到函数。生成了无效的编辑:“{0}”"
}
@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"fix_all_code_analysis_problems": "修复所有代码分析问题",
"clear_all_code_analysis_problems": "清除所有代码分析问题",
"fix_all_type_problems": "修复所有 {0} 问题",
"disable_all_type_problems": "禁用所有 {0} 问题",
"clear_all_type_problems": "清除所有{0}问题",
"clear_this_problem": "清除此 {0} 问题",
"fix_this_problem": "修复此 {0} 问题",
"show_documentation_for": "显示 {0} 文档"
"fix.all.code.analysis.problems": "修复所有代码分析问题",
"clear.all.code.analysis.problems": "清除所有代码分析问题",
"fix.all.type.problems": "修复所有 {0} 问题",
"disable.all.type.problems": "禁用所有 {0} 问题",
"clear.all.type.problems": "清除所有{0}问题",
"clear.this.problem": "清除此 {0} 问题",
"fix.this.problem": "修复此 {0} 问题",
"show.documentation.for": "显示 {0} 文档"
}
@@ -16,5 +16,7 @@
"path.is.not.a.file": "路径不是文件: {0}",
"path.is.not.a.directory": "路径不是目录: {0}",
"duplicate.name": "{0} 重复。配置名称应是唯一的。",
"cannot.find2": "无法找到“{0}”。"
"cannot.find2": "无法找到“{0}”。",
"multiple.paths.not.allowed": "不允许使用多个路径。",
"paths.are.not.directories": "路径不是目录: {0}"
}
@@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"build_active_file": "生成活动文件",
"compiler_details": "编译器:",
"task_generated_by_debugger": "调试器生成的任务。",
"build.active.file": "生成活动文件",
"compiler.details": "编译器:",
"task.generated.by.debugger": "调试器生成的任务。",
"cannot.build.non.cpp": "无法生成和调试,因为活动文件不是 C 或 C++ 源文件。",
"starting_build": "正在启动生成...",
"starting.build": "正在启动生成...",
"build.run.terminated": "生成运行已终止。",
"build.finished.with.error": "生成已完成,但出现错误。",
"build.finished.with.warnings": "生成已完成,但收到警告。",

Some files were not shown because too many files have changed in this diff Show More