Title: Check whether a module references itself in 'NestedModules' field in the .psd1 file · Issue #997 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Check whether a module references itself in 'NestedModules' field in the .psd1 file · Issue #997 · PowerShell/PSScriptAnalyzer
X Title: Check whether a module references itself in 'NestedModules' field in the .psd1 file · Issue #997 · PowerShell/PSScriptAnalyzer
Description: This feature ask is per discussion in PowerShell/PowerShell#6843 (comment). Importing a ill-structured module could result in a circular nested module. For example, for the following code, you will see 'True' as the output. $testdir = Jo...
Open Graph Description: This feature ask is per discussion in PowerShell/PowerShell#6843 (comment). Importing a ill-structured module could result in a circular nested module. For example, for the following code, you will...
X Description: This feature ask is per discussion in PowerShell/PowerShell#6843 (comment). Importing a ill-structured module could result in a circular nested module. For example, for the following code, you will...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/997
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Check whether a module references itself in 'NestedModules' field in the .psd1 file","articleBody":"This feature ask is per discussion in https://github.com/PowerShell/PowerShell/pull/6843#discussion_r187123774.\r\n\r\nImporting a ill-structured module could result in a circular nested module. For example, for the following code, you will see 'True' as the output.\r\n```\r\n$testdir = Join-Path $env:TEMP test\r\n$testpsm1 = Join-Path $testdir test.psm1\r\n$testpsd1 = Join-Path $testdir test.psd1\r\nmkdir $testdir \u003e $null\r\nSet-Content $testpsm1 -Value \"function bar {}\"\r\nSet-Content $testpsd1 -Value \"@{ ModuleVersion = '0.0.1'; RootModule = 'test'; NestedModules = @('test') }\"\r\n\r\n$m = Import-Module $testpsd1 -Pass\r\n$m -eq $m.NestedModules[0]\r\n\u003e True\r\n```\r\n\r\nSo maybe a rule can be written to check the bold part of `test.psd1` \"@{ ModuleVersion = '0.0.1'; RootModule = 'test'; **NestedModules = @('test')** }\", to make sure the author is warned when a module like `test.psd1` has itself as a nested module.","author":{"url":"https://github.com/daxian-dbw","@type":"Person","name":"daxian-dbw"},"datePublished":"2018-05-10T23:05:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/997/PSScriptAnalyzer/issues/997"}
| 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:a8ba1c67-b47c-bc77-e0a7-f84d4fcc2392 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1EE:2A95D0:3A56F5:558F37:6A5609BA |
| html-safe-nonce | df968d5a422e1bd96d022abf84b3a2e359a7410bca03ce4c97e5987575ae23f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUVFOjJBOTVEMDozQTU2RjU6NTU4RjM3OjZBNTYwOUJBIiwidmlzaXRvcl9pZCI6IjM3NjczMzg0NTUzMjUzNDYyMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 20a07d8a62ae2cd245f0773a11996ce7957e6a589bcefe467ddb28aebe10ab6d |
| hovercard-subject-tag | issue:322115766 |
| 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/997/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0e489da8720c1aef9d4d5b2f2c90d107e40473da05651a424021342c60a4e6bd/PowerShell/PSScriptAnalyzer/issues/997 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0e489da8720c1aef9d4d5b2f2c90d107e40473da05651a424021342c60a4e6bd/PowerShell/PSScriptAnalyzer/issues/997 |
| og:image:alt | This feature ask is per discussion in PowerShell/PowerShell#6843 (comment). Importing a ill-structured module could result in a circular nested module. For example, for the following code, you will... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daxian-dbw |
| hostname | github.com |
| expected-hostname | github.com |
| None | f4368738fc918fecd9b3958f6b49218bbe60d4185f38e72e3954e11f1ad0213a |
| 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 | 85a7179838b41e8b23f939d3b67b53f752ecfc54 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width