Title: Missing line number in rule PSUseBOMForUnicodeEncodedFile · Issue #1859 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Missing line number in rule PSUseBOMForUnicodeEncodedFile · Issue #1859 · PowerShell/PSScriptAnalyzer
X Title: Missing line number in rule PSUseBOMForUnicodeEncodedFile · Issue #1859 · PowerShell/PSScriptAnalyzer
Description: Line numbers are missing for the Rule "Missing Line Number for PSUseBOMForUnicodeEncodedFile" Steps to reproduce Introduce a file test.ps1 with the following content: Get–ChildItem Run the PSScriptAnalyzer in the directory where the file...
Open Graph Description: Line numbers are missing for the Rule "Missing Line Number for PSUseBOMForUnicodeEncodedFile" Steps to reproduce Introduce a file test.ps1 with the following content: Get–ChildItem Run the PSScript...
X Description: Line numbers are missing for the Rule "Missing Line Number for PSUseBOMForUnicodeEncodedFile" Steps to reproduce Introduce a file test.ps1 with the following content: Get–ChildItem Run th...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/1859
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing line number in rule PSUseBOMForUnicodeEncodedFile","articleBody":"Line numbers are missing for the Rule \"Missing Line Number for PSUseBOMForUnicodeEncodedFile\"\r\n\r\nSteps to reproduce\r\n------------------\r\nIntroduce a file test.ps1 with the following content:\r\n```PowerShell\r\nGet–ChildItem\r\n```\r\nRun the PSScriptAnalyzer in the directory where the file remains.\r\n\r\nBe aware of the dash:\r\n> The character U+2013 \"–\" could be confused with the character U+002d \"-\", which is more common in source code.\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```PowerShell\r\nInvoke-ScriptAnalyzer -Recurse -Path .\r\n\r\nRuleName Severity ScriptName Line Message\r\n-------- -------- ---------- ---- -------\r\nPSUseBOMForUnicodeEncodedFile Warning test.ps1 1 Missing BOM encoding for non-ASCII encoded file 'test.ps1'\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```PowerShell\r\nInvoke-ScriptAnalyzer -Recurse -Path .\r\n\r\nRuleName Severity ScriptName Line Message\r\n-------- -------- ---------- ---- -------\r\nPSUseBOMForUnicodeEncodedFile Warning test.ps1 Missing BOM encoding for non-ASCII encoded file 'test.ps1'\r\n```\r\n\r\nIf an unexpected error was thrown then please report the full error details using e.g. `$error[0] | Select-Object *`\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- Provide the output of the following 2 commands -->\r\n\r\n```PowerShell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 7.2.5\r\nPSEdition Core\r\nGitCommitId 7.2.5\r\nOS Microsoft Windows 10.0.19044\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\r\n1.21.0\r\n```\r\n","author":{"url":"https://github.com/clma91","@type":"Person","name":"clma91"},"datePublished":"2022-11-07T15:56:46Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/1859"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3f29ecdd-80d0-02c3-c21a-632d728ef9a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B750:2209C1:24B4E4:32E159:6AFCE4A5 |
| html-safe-nonce | b1da6a17eed8382ef7b4001da8f39c74dda7c5d7a7d239142da6a2accefdbf38 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzUwOjIyMDlDMToyNEI0RTQ6MzJFMTU5OjZBRkNFNEE1IiwidmlzaXRvcl9pZCI6IjgyMjM1NjgyMTQwODkzMjc3ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7f5a801564b07972650b508d44b13ccb8f5f03988f1563e41c4a4cd6732f9466 |
| hovercard-subject-tag | issue:1438591520 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/1859/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7072ae12288ab567b82d493b5e1bab2d8e5f6e6f1f78cba6f122f07f7e3d9c30/PowerShell/PSScriptAnalyzer/issues/1859 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7072ae12288ab567b82d493b5e1bab2d8e5f6e6f1f78cba6f122f07f7e3d9c30/PowerShell/PSScriptAnalyzer/issues/1859 |
| og:image:alt | Line numbers are missing for the Rule "Missing Line Number for PSUseBOMForUnicodeEncodedFile" Steps to reproduce Introduce a file test.ps1 with the following content: Get–ChildItem Run the PSScript... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | clma91 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 99aede4c5f55ec5cf06666a8c9e03ebf9f85f7231223e7f1c38c16e5504835b3 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ecfd63ca125ec74b42f74eeb158b3fa081c8c497 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width