-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Ensure single trailing newline in generated files #6781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: html: true, live: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -80,4 +80,3 @@
window.liveReloader = reloader
})
}
-Full Rendered Outputs (Before & After)Before Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
import {hooks as colocatedHooks} from "phoenix-colocated/my_app_web"
import topbar from "../vendor/topbar"
const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
const liveSocket = new LiveSocket("/live", Socket, {
longPollFallbackMs: 2500,
params: {_csrf_token: csrfToken},
hooks: {...colocatedHooks},
})
// Show progress bar on live navigation and form submits
topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"})
window.addEventListener("phx:page-loading-start", _info => topbar.show(300))
window.addEventListener("phx:page-loading-stop", _info => topbar.hide())
// connect if there are any LiveViews on the page
liveSocket.connect()
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
// >> liveSocket.disableLatencySim()
window.liveSocket = liveSocket
// The lines below enable quality of life phoenix_live_reload
// development features:
//
// 1. stream server logs to the browser console
// 2. click on elements to jump to their definitions in your code editor
//
if (process.env.NODE_ENV === "development") {
window.addEventListener("phx:live_reload:attached", ({detail: reloader}) => {
// Enable server log streaming to client.
// Disable with reloader.disableServerLogs()
reloader.enableServerLogs()
// Open configured PLUG_EDITOR at file:line of the clicked element's HEEx component
//
// * click with "c" key pressed to open at caller location
// * click with "d" key pressed to open at function component definition location
let keyDown
window.addEventListener("keydown", e => keyDown = e.key)
window.addEventListener("keyup", _e => keyDown = null)
window.addEventListener("click", e => {
if(keyDown === "c"){
e.preventDefault()
e.stopImmediatePropagation()
reloader.openEditorAtCaller(e.target)
} else if(keyDown === "d"){
e.preventDefault()
e.stopImmediatePropagation()
reloader.openEditorAtDef(e.target)
}
}, true)
window.liveReloader = reloader
})
}After Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
import {hooks as colocatedHooks} from "phoenix-colocated/my_app_web"
import topbar from "../vendor/topbar"
const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
const liveSocket = new LiveSocket("/live", Socket, {
longPollFallbackMs: 2500,
params: {_csrf_token: csrfToken},
hooks: {...colocatedHooks},
})
// Show progress bar on live navigation and form submits
topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"})
window.addEventListener("phx:page-loading-start", _info => topbar.show(300))
window.addEventListener("phx:page-loading-stop", _info => topbar.hide())
// connect if there are any LiveViews on the page
liveSocket.connect()
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
// >> liveSocket.disableLatencySim()
window.liveSocket = liveSocket
// The lines below enable quality of life phoenix_live_reload
// development features:
//
// 1. stream server logs to the browser console
// 2. click on elements to jump to their definitions in your code editor
//
if (process.env.NODE_ENV === "development") {
window.addEventListener("phx:live_reload:attached", ({detail: reloader}) => {
// Enable server log streaming to client.
// Disable with reloader.disableServerLogs()
reloader.enableServerLogs()
// Open configured PLUG_EDITOR at file:line of the clicked element's HEEx component
//
// * click with "c" key pressed to open at caller location
// * click with "d" key pressed to open at function component definition location
let keyDown
window.addEventListener("keydown", e => keyDown = e.key)
window.addEventListener("keyup", _e => keyDown = null)
window.addEventListener("click", e => {
if(keyDown === "c"){
e.preventDefault()
e.stopImmediatePropagation()
reloader.openEditorAtCaller(e.target)
} else if(keyDown === "d"){
e.preventDefault()
e.stopImmediatePropagation()
reloader.openEditorAtDef(e.target)
}
}, true)
window.liveReloader = reloader
})
}Permutation: html: true, live: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -81,10 +81,9 @@
// })
// }
-
// Handle flash close
document.querySelectorAll("[role=alert][data-flash]").forEach((el) => {
el.addEventListener("click", () => {
el.setAttribute("hidden", "")
})
-})
\ No newline at end of file
+})Full Rendered Outputs (Before & After)Before Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
// import {Socket} from "phoenix"
// import {LiveSocket} from "phoenix_live_view"
// import {hooks as colocatedHooks} from "phoenix-colocated/my_app_web"
// import topbar from "../vendor/topbar"
// const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
// const liveSocket = new LiveSocket("/live", Socket, {
// longPollFallbackMs: 2500,
// params: {_csrf_token: csrfToken},
// hooks: {...colocatedHooks},
// })
// Show progress bar on live navigation and form submits
// topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"})
// window.addEventListener("phx:page-loading-start", _info => topbar.show(300))
// window.addEventListener("phx:page-loading-stop", _info => topbar.hide())
// connect if there are any LiveViews on the page
// liveSocket.connect()
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
// >> liveSocket.disableLatencySim()
// window.liveSocket = liveSocket
// The lines below enable quality of life phoenix_live_reload
// development features:
//
// 1. stream server logs to the browser console
// 2. click on elements to jump to their definitions in your code editor
//
// if (process.env.NODE_ENV === "development") {
// window.addEventListener("phx:live_reload:attached", ({detail: reloader}) => {
// // Enable server log streaming to client.
// // Disable with reloader.disableServerLogs()
// reloader.enableServerLogs()
//
// // Open configured PLUG_EDITOR at file:line of the clicked element's HEEx component
// //
// // * click with "c" key pressed to open at caller location
// // * click with "d" key pressed to open at function component definition location
// let keyDown
// window.addEventListener("keydown", e => keyDown = e.key)
// window.addEventListener("keyup", _e => keyDown = null)
// window.addEventListener("click", e => {
// if(keyDown === "c"){
// e.preventDefault()
// e.stopImmediatePropagation()
// reloader.openEditorAtCaller(e.target)
// } else if(keyDown === "d"){
// e.preventDefault()
// e.stopImmediatePropagation()
// reloader.openEditorAtDef(e.target)
// }
// }, true)
//
// window.liveReloader = reloader
// })
// }
// Handle flash close
document.querySelectorAll("[role=alert][data-flash]").forEach((el) => {
el.addEventListener("click", () => {
el.setAttribute("hidden", "")
})
})```
##### After Commit
```javascript
// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons.
import "phoenix_html"
// Establish Phoenix Socket and LiveView configuration.
// import {Socket} from "phoenix"
// import {LiveSocket} from "phoenix_live_view"
// import {hooks as colocatedHooks} from "phoenix-colocated/my_app_web"
// import topbar from "../vendor/topbar"
// const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
// const liveSocket = new LiveSocket("/live", Socket, {
// longPollFallbackMs: 2500,
// params: {_csrf_token: csrfToken},
// hooks: {...colocatedHooks},
// })
// Show progress bar on live navigation and form submits
// topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"})
// window.addEventListener("phx:page-loading-start", _info => topbar.show(300))
// window.addEventListener("phx:page-loading-stop", _info => topbar.hide())
// connect if there are any LiveViews on the page
// liveSocket.connect()
// expose liveSocket on window for web console debug logs and latency simulation:
// >> liveSocket.enableDebug()
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
// >> liveSocket.disableLatencySim()
// window.liveSocket = liveSocket
// The lines below enable quality of life phoenix_live_reload
// development features:
//
// 1. stream server logs to the browser console
// 2. click on elements to jump to their definitions in your code editor
//
// if (process.env.NODE_ENV === "development") {
// window.addEventListener("phx:live_reload:attached", ({detail: reloader}) => {
// // Enable server log streaming to client.
// // Disable with reloader.disableServerLogs()
// reloader.enableServerLogs()
//
// // Open configured PLUG_EDITOR at file:line of the clicked element's HEEx component
// //
// // * click with "c" key pressed to open at caller location
// // * click with "d" key pressed to open at function component definition location
// let keyDown
// window.addEventListener("keydown", e => keyDown = e.key)
// window.addEventListener("keyup", _e => keyDown = null)
// window.addEventListener("click", e => {
// if(keyDown === "c"){
// e.preventDefault()
// e.stopImmediatePropagation()
// reloader.openEditorAtCaller(e.target)
// } else if(keyDown === "d"){
// e.preventDefault()
// e.stopImmediatePropagation()
// reloader.openEditorAtDef(e.target)
// }
// }, true)
//
// window.liveReloader = reloader
// })
// }
// Handle flash close
document.querySelectorAll("[role=alert][data-flash]").forEach((el) => {
el.addEventListener("click", () => {
el.setAttribute("hidden", "")
})
})Permutation: html: false, live: true (Output unchanged)Unified Output Diff(No output changes)Full Rendered Outputs (Before & After)Before Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.After Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.Permutation: html: false, live: false (Output unchanged)Unified Output Diff(No output changes)Full Rendered Outputs (Before & After)Before Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file.After Commit// If you want to use Phoenix channels, run `mix help phx.gen.channel`
// to get started and then uncomment the line below.
// import "./user_socket.js"
// You can include dependencies in two ways.
//
// The simplest option is to put them in assets/vendor and
// import them using relative paths:
//
// import "../vendor/some-package.js"
//
// Alternatively, you can `npm install some-package --prefix assets` and import
// them using a path starting with the package name:
//
// import "some-package"
//
// If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file.
// To load it, simply add a second `<link>` to your `root.html.heex` file. |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,8 +15,8 @@ | |||||||||||||
| // import "some-package" | ||||||||||||||
| // | ||||||||||||||
| // If you have dependencies that try to import CSS, esbuild will generate a separate `app.css` file. | ||||||||||||||
| // To load it, simply add a second `<link>` to your `root.html.heex` file. | ||||||||||||||
| <%= if @html do %> | ||||||||||||||
| // To load it, simply add a second `<link>` to your `root.html.heex` file.<%= if @html do %> | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think this one is deliberate
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, good catch. The intention was to remove additional newlines at the end of file when
Suggested change
I.e., the |
||||||||||||||
|
|
||||||||||||||
| // Include phoenix_html to handle method=PUT/DELETE in forms and buttons. | ||||||||||||||
| import "phoenix_html" | ||||||||||||||
| // Establish Phoenix Socket and LiveView configuration. | ||||||||||||||
|
|
@@ -79,12 +79,11 @@ import "phoenix_html" | |||||||||||||
| <%= @live_comment %> | ||||||||||||||
| <%= @live_comment %> window.liveReloader = reloader | ||||||||||||||
| <%= @live_comment %> }) | ||||||||||||||
| <%= @live_comment %>} | ||||||||||||||
| <%= @live_comment %>}<%= if not @live do %> | ||||||||||||||
|
|
||||||||||||||
| <%= if not @live do %> | ||||||||||||||
| // Handle flash close | ||||||||||||||
| document.querySelectorAll("[role=alert][data-flash]").forEach((el) => { | ||||||||||||||
| el.addEventListener("click", () => { | ||||||||||||||
| el.setAttribute("hidden", "") | ||||||||||||||
| }) | ||||||||||||||
| })<% end %><% end %> | ||||||||||||||
| })<% end %><% end %> | ||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: ecto: true (Output unchanged)Unified Output Diff(No output changes)Full Rendered Outputs (Before & After)Before Commit## This is a PO Template file.
##
## `msgid`s here are often extracted from source code.
## Add new translations manually only if they're dynamic
## translations that can't be statically extracted.
##
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here has no
## effect: edit them in PO (`.po`) files instead.
## From Ecto.Changeset.cast/4
msgid "can't be blank"
msgstr ""
## From Ecto.Changeset.unique_constraint/3
msgid "has already been taken"
msgstr ""
## From Ecto.Changeset.put_change/3
msgid "is invalid"
msgstr ""
## From Ecto.Changeset.validate_acceptance/3
msgid "must be accepted"
msgstr ""
## From Ecto.Changeset.validate_format/3
msgid "has invalid format"
msgstr ""
## From Ecto.Changeset.validate_subset/3
msgid "has an invalid entry"
msgstr ""
## From Ecto.Changeset.validate_exclusion/3
msgid "is reserved"
msgstr ""
## From Ecto.Changeset.validate_confirmation/3
msgid "does not match confirmation"
msgstr ""
## From Ecto.Changeset.no_assoc_constraint/3
msgid "is still associated with this entry"
msgstr ""
msgid "are still associated with this entry"
msgstr ""
## From Ecto.Changeset.validate_length/3
msgid "should have %{count} item(s)"
msgid_plural "should have %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be %{count} character(s)"
msgid_plural "should be %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be %{count} byte(s)"
msgid_plural "should be %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should have at least %{count} item(s)"
msgid_plural "should have at least %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at least %{count} character(s)"
msgid_plural "should be at least %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at least %{count} byte(s)"
msgid_plural "should be at least %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should have at most %{count} item(s)"
msgid_plural "should have at most %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at most %{count} character(s)"
msgid_plural "should be at most %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at most %{count} byte(s)"
msgid_plural "should be at most %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
## From Ecto.Changeset.validate_number/3
msgid "must be less than %{number}"
msgstr ""
msgid "must be greater than %{number}"
msgstr ""
msgid "must be less than or equal to %{number}"
msgstr ""
msgid "must be greater than or equal to %{number}"
msgstr ""
msgid "must be equal to %{number}"
msgstr ""After Commit## This is a PO Template file.
##
## `msgid`s here are often extracted from source code.
## Add new translations manually only if they're dynamic
## translations that can't be statically extracted.
##
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here has no
## effect: edit them in PO (`.po`) files instead.
## From Ecto.Changeset.cast/4
msgid "can't be blank"
msgstr ""
## From Ecto.Changeset.unique_constraint/3
msgid "has already been taken"
msgstr ""
## From Ecto.Changeset.put_change/3
msgid "is invalid"
msgstr ""
## From Ecto.Changeset.validate_acceptance/3
msgid "must be accepted"
msgstr ""
## From Ecto.Changeset.validate_format/3
msgid "has invalid format"
msgstr ""
## From Ecto.Changeset.validate_subset/3
msgid "has an invalid entry"
msgstr ""
## From Ecto.Changeset.validate_exclusion/3
msgid "is reserved"
msgstr ""
## From Ecto.Changeset.validate_confirmation/3
msgid "does not match confirmation"
msgstr ""
## From Ecto.Changeset.no_assoc_constraint/3
msgid "is still associated with this entry"
msgstr ""
msgid "are still associated with this entry"
msgstr ""
## From Ecto.Changeset.validate_length/3
msgid "should have %{count} item(s)"
msgid_plural "should have %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be %{count} character(s)"
msgid_plural "should be %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be %{count} byte(s)"
msgid_plural "should be %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should have at least %{count} item(s)"
msgid_plural "should have at least %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at least %{count} character(s)"
msgid_plural "should be at least %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at least %{count} byte(s)"
msgid_plural "should be at least %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should have at most %{count} item(s)"
msgid_plural "should have at most %{count} item(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at most %{count} character(s)"
msgid_plural "should be at most %{count} character(s)"
msgstr[0] ""
msgstr[1] ""
msgid "should be at most %{count} byte(s)"
msgid_plural "should be at most %{count} byte(s)"
msgstr[0] ""
msgstr[1] ""
## From Ecto.Changeset.validate_number/3
msgid "must be less than %{number}"
msgstr ""
msgid "must be greater than %{number}"
msgstr ""
msgid "must be less than or equal to %{number}"
msgstr ""
msgid "must be greater than or equal to %{number}"
msgstr ""
msgid "must be equal to %{number}"
msgstr ""Permutation: ecto: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -7,4 +7,3 @@
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here has no
## effect: edit them in PO (`.po`) files instead.
-Full Rendered Outputs (Before & After)Before Commit## This is a PO Template file.
##
## `msgid`s here are often extracted from source code.
## Add new translations manually only if they're dynamic
## translations that can't be statically extracted.
##
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here has no
## effect: edit them in PO (`.po`) files instead.
After Commit## This is a PO Template file.
##
## `msgid`s here are often extracted from source code.
## Add new translations manually only if they're dynamic
## translations that can't be statically extracted.
##
## Run `mix gettext.extract` to bring this file up to
## date. Leave `msgstr`s empty as changing them here has no
## effect: edit them in PO (`.po`) files instead. |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: (javascript or css): true, sqlite3: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -38,4 +38,3 @@
# Database files
*.db
*.db-*
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): true, sqlite3: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -34,4 +34,3 @@
# In case you use Node.js/npm, you want to ignore these.
npm-debug.log
/assets/node_modules/
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): false, sqlite3: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -28,4 +28,3 @@
# Database files
*.db
*.db-*
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): false, sqlite3: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -24,4 +24,3 @@
# Ignore package tarball (built via "mix hex.build").
my_app-*.tar
-Full Rendered Outputs (Before & After)Before CommitAfter Commit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2587,4 +2587,3 @@ | |
| transform: rotate(360deg); | ||
| } | ||
| } | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: (javascript or css): true, sqlite3: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -38,4 +38,3 @@
# Database files
*.db
*.db-*
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): true, sqlite3: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -34,4 +34,3 @@
# In case you use Node.js/npm, you want to ignore these.
npm-debug.log
/assets/node_modules/
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): false, sqlite3: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -28,4 +28,3 @@
# Database files
*.db
*.db-*
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: (javascript or css): false, sqlite3: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -24,4 +24,3 @@
# Ignore package tarball (built via "mix hex.build").
my_app_web-*.tar
-Full Rendered Outputs (Before & After)Before CommitAfter Commit |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: mailer: true, html: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -16,7 +16,7 @@
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
-
+
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
- sort_verified_routes_query_params: true
\ No newline at end of file
+ sort_verified_routes_query_params: trueFull Rendered Outputs (Before & After)Before Commitimport Config
# Print only warnings and errors during test
config :logger, level: :warning
# In test we don't send emails
config :my_app, MyApp.Mailer,
adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters
config :swoosh, :api_client, false
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: true```
##### After Commit
```elixir
import Config
# Print only warnings and errors during test
config :logger, level: :warning
# In test we don't send emails
config :my_app, MyApp.Mailer,
adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters
config :swoosh, :api_client, false
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: truePermutation: mailer: true, html: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -12,7 +12,7 @@
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
-
+
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
- sort_verified_routes_query_params: true
\ No newline at end of file
+ sort_verified_routes_query_params: trueFull Rendered Outputs (Before & After)Before Commitimport Config
# Print only warnings and errors during test
config :logger, level: :warning
# In test we don't send emails
config :my_app, MyApp.Mailer,
adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters
config :swoosh, :api_client, false
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: true```
##### After Commit
```elixir
import Config
# Print only warnings and errors during test
config :logger, level: :warning
# In test we don't send emails
config :my_app, MyApp.Mailer,
adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters
config :swoosh, :api_client, false
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: truePermutation: mailer: false, html: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -9,7 +9,7 @@
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
-
+
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
- sort_verified_routes_query_params: true
\ No newline at end of file
+ sort_verified_routes_query_params: trueFull Rendered Outputs (Before & After)Before Commitimport Config
# Print only warnings and errors during test
config :logger, level: :warning
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: true```
##### After Commit
```elixir
import Config
# Print only warnings and errors during test
config :logger, level: :warning
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: truePermutation: mailer: false, html: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -5,7 +5,7 @@
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
-
+
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
- sort_verified_routes_query_params: true
\ No newline at end of file
+ sort_verified_routes_query_params: trueFull Rendered Outputs (Before & After)Before Commitimport Config
# Print only warnings and errors during test
config :logger, level: :warning
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: true```
##### After Commit
```elixir
import Config
# Print only warnings and errors during test
config :logger, level: :warning
# Initialize plugs at runtime for faster test compilation
config :phoenix, :plug_init_mode, :runtime
# Sort query params output of verified routes for robust url comparisons
config :phoenix,
sort_verified_routes_query_params: true |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: sqlite3: true (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -22,8 +22,6 @@
# Temporary files, for example, from tests.
/tmp/
-
# Database files
*.db
*.db-*
-Full Rendered Outputs (Before & After)Before CommitAfter CommitPermutation: sqlite3: false (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -21,5 +21,3 @@
# Temporary files, for example, from tests.
/tmp/
-
-Full Rendered Outputs (Before & After)Before CommitAfter Commit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,8 +96,21 @@ defmodule MixHelper do | |
|
|
||
| def assert_file(file) do | ||
| assert File.regular?(file), "Expected #{file} to exist, but does not" | ||
| content = File.read!(file) | ||
|
|
||
| if not binary_file?(file) do | ||
| # \S\n\z matches non-whitespace followed by a single newline at EOF | ||
| assert content == "" or content =~ ~r/\S\n\z/, | ||
| "Expected #{file} to end with a single trailing newline" | ||
|
|
||
| refute content =~ "\n\n\n", "Expected #{file} to not contain consecutive blank lines" | ||
| end | ||
|
|
||
| content | ||
|
Comment on lines
+99
to
+109
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is similar to elixir-lang/elixir#15711, but skipping the additional checks on some files by extension. |
||
| end | ||
|
|
||
| defp binary_file?(file), do: Path.extname(file) in ~w(.ico .pem .png) | ||
|
|
||
| def refute_file(file) do | ||
| refute File.regular?(file), "Expected #{file} to not exist, but it does" | ||
| end | ||
|
|
@@ -111,8 +124,8 @@ defmodule MixHelper do | |
| assert_file(file, &assert(&1 =~ match)) | ||
|
|
||
| is_function(match, 1) -> | ||
| assert_file(file) | ||
| match.(File.read!(file)) | ||
| content = assert_file(file) | ||
| match.(content) | ||
|
|
||
| true -> | ||
| raise inspect({file, match}) | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: With fields (title:string), no assocs (Output unchanged)Unified Output Diff(No output changes)Full Rendered Outputs (Before & After)Before Commitdefmodule Phoenix.Blog.Post do
use Ecto.Schema
import Ecto.Changeset
schema "posts" do
field :title, :string
timestamps()
end
@doc false
def changeset(post, attrs) do
post
|> cast(attrs, [:title])
|> validate_required([:title])
end
endAfter Commitdefmodule Phoenix.Blog.Post do
use Ecto.Schema
import Ecto.Changeset
schema "posts" do
field :title, :string
timestamps()
end
@doc false
def changeset(post, attrs) do
post
|> cast(attrs, [:title])
|> validate_required([:title])
end
endPermutation: No fields, no assocs (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -3,8 +3,6 @@
import Ecto.Changeset
schema "posts" do
-
-
timestamps()
end
Full Rendered Outputs (Before & After)Before Commitdefmodule Phoenix.Blog.Post do
use Ecto.Schema
import Ecto.Changeset
schema "posts" do
timestamps()
end
@doc false
def changeset(post, attrs) do
post
|> cast(attrs, [])
|> validate_required([])
end
endAfter Commitdefmodule Phoenix.Blog.Post do
use Ecto.Schema
import Ecto.Changeset
schema "posts" do
timestamps()
end
@doc false
def changeset(post, attrs) do
post
|> cast(attrs, [])
|> validate_required([])
end
endPermutation: No fields, with assoc (post_id:references) (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -3,7 +3,6 @@
import Ecto.Changeset
schema "comments" do
-
field :post_id, :id
timestamps()Full Rendered Outputs (Before & After)Before Commitdefmodule Phoenix.Blog.Comment do
use Ecto.Schema
import Ecto.Changeset
schema "comments" do
field :post_id, :id
timestamps()
end
@doc false
def changeset(comment, attrs) do
comment
|> cast(attrs, [])
|> validate_required([])
end
endAfter Commitdefmodule Phoenix.Blog.Comment do
use Ecto.Schema
import Ecto.Changeset
schema "comments" do
field :post_id, :id
timestamps()
end
@doc false
def changeset(comment, attrs) do
comment
|> cast(attrs, [])
|> validate_required([])
end
endPermutation: With fields (title:string) and assoc (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -3,7 +3,6 @@
import Ecto.Changeset
schema "comments" do
-
field :post_id, :id
timestamps()Full Rendered Outputs (Before & After)Before Commitdefmodule Phoenix.Blog.Comment do
use Ecto.Schema
import Ecto.Changeset
schema "comments" do
field :post_id, :id
timestamps()
end
@doc false
def changeset(comment, attrs) do
comment
|> cast(attrs, [])
|> validate_required([])
end
endAfter Commitdefmodule Phoenix.Blog.Comment do
use Ecto.Schema
import Ecto.Changeset
schema "comments" do
field :post_id, :id
timestamps()
end
@doc false
def changeset(comment, attrs) do
comment
|> cast(attrs, [])
|> validate_required([])
end
end |
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Computed Outputs Across Conditional PermutationsPermutation: existing_channel present (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -6,8 +6,6 @@
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
- ## Channels
-
channel "user:*", UserChannel
# Socket params are passed from the client and canFull Rendered Outputs (Before & After)Before Commitdefmodule UserSocket do
use Phoenix.Socket
# A Socket handler
#
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
## Channels
channel "user:*", UserChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
#
# {:ok, assign(socket, :user_id, verified_user_id)}
#
# To deny connection, return `:error` or `{:error, term}`. To control the
# response the client receives in that case, [define an error handler in the
# websocket
# configuration](https://phoenix.hexdocs.pm/Phoenix.Endpoint.html#socket/3-websocket-configuration).
#
# See `Phoenix.Token` documentation for examples in
# performing token verification on connect.
@impl true
def connect(_params, socket, _connect_info) do
{:ok, socket}
end
# Socket IDs are topics that allow you to identify all sockets for a given user:
#
# def id(socket), do: "user_socket:#{socket.assigns.user_id}"
#
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
# UserWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
@impl true
def id(_socket), do: nil
endAfter Commitdefmodule UserSocket do
use Phoenix.Socket
# A Socket handler
#
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
channel "user:*", UserChannel
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
#
# {:ok, assign(socket, :user_id, verified_user_id)}
#
# To deny connection, return `:error` or `{:error, term}`. To control the
# response the client receives in that case, [define an error handler in the
# websocket
# configuration](https://phoenix.hexdocs.pm/Phoenix.Endpoint.html#socket/3-websocket-configuration).
#
# See `Phoenix.Token` documentation for examples in
# performing token verification on connect.
@impl true
def connect(_params, socket, _connect_info) do
{:ok, socket}
end
# Socket IDs are topics that allow you to identify all sockets for a given user:
#
# def id(socket), do: "user_socket:#{socket.assigns.user_id}"
#
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
# UserWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
@impl true
def id(_socket), do: nil
endPermutation: existing_channel nil (Output changed by commit)Unified Output Diff--- Before
+++ After
@@ -6,7 +6,6 @@
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
- ## Channels
# Uncomment the following line to define a "room:*" topic
# pointing to the `UserWeb.RoomChannel`:
#
@@ -19,7 +18,6 @@
# See the [`Channels guide`](https://phoenix.hexdocs.pm/channels.html)
# for further details.
-
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns intoFull Rendered Outputs (Before & After)Before Commitdefmodule UserSocket do
use Phoenix.Socket
# A Socket handler
#
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
## Channels
# Uncomment the following line to define a "room:*" topic
# pointing to the `UserWeb.RoomChannel`:
#
# channel "room:*", UserWeb.RoomChannel
#
# To create a channel file, use the mix task:
#
# mix phx.gen.channel Room
#
# See the [`Channels guide`](https://phoenix.hexdocs.pm/channels.html)
# for further details.
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
#
# {:ok, assign(socket, :user_id, verified_user_id)}
#
# To deny connection, return `:error` or `{:error, term}`. To control the
# response the client receives in that case, [define an error handler in the
# websocket
# configuration](https://phoenix.hexdocs.pm/Phoenix.Endpoint.html#socket/3-websocket-configuration).
#
# See `Phoenix.Token` documentation for examples in
# performing token verification on connect.
@impl true
def connect(_params, socket, _connect_info) do
{:ok, socket}
end
# Socket IDs are topics that allow you to identify all sockets for a given user:
#
# def id(socket), do: "user_socket:#{socket.assigns.user_id}"
#
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
# UserWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
@impl true
def id(_socket), do: nil
endAfter Commitdefmodule UserSocket do
use Phoenix.Socket
# A Socket handler
#
# It's possible to control the websocket connection and
# assign values that can be accessed by your channel topics.
# Uncomment the following line to define a "room:*" topic
# pointing to the `UserWeb.RoomChannel`:
#
# channel "room:*", UserWeb.RoomChannel
#
# To create a channel file, use the mix task:
#
# mix phx.gen.channel Room
#
# See the [`Channels guide`](https://phoenix.hexdocs.pm/channels.html)
# for further details.
# Socket params are passed from the client and can
# be used to verify and authenticate a user. After
# verification, you can put default assigns into
# the socket that will be set for all channels, ie
#
# {:ok, assign(socket, :user_id, verified_user_id)}
#
# To deny connection, return `:error` or `{:error, term}`. To control the
# response the client receives in that case, [define an error handler in the
# websocket
# configuration](https://phoenix.hexdocs.pm/Phoenix.Endpoint.html#socket/3-websocket-configuration).
#
# See `Phoenix.Token` documentation for examples in
# performing token verification on connect.
@impl true
def connect(_params, socket, _connect_info) do
{:ok, socket}
end
# Socket IDs are topics that allow you to identify all sockets for a given user:
#
# def id(socket), do: "user_socket:#{socket.assigns.user_id}"
#
# Would allow you to broadcast a "disconnect" event and terminate
# all active sockets and channels for a given user:
#
# UserWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})
#
# Returning `nil` makes this socket anonymous.
@impl true
def id(_socket), do: nil
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Computed Outputs Across Conditional Permutations
Permutation: Full-stack project (Representative of all 16 flag permutations) (Output changed by commit)
Unified Output Diff
Full Rendered Outputs (Before & After) omitted for brevity.