The study of finite-temperature dynamics of one-dimensional Fermi gases is a challenging problem. These systems can present different phenomena, including the formation and propagation of shock waves and collective oscillations. Here we calculate the dynamics of collective oscillations and shock waves in a noninteracting one-dimensional ultracold Fermi gas, at both zero and finite temperature. These results are obtained using the Majorana P-function method, which is a positive phase-space representation on a space of antisymmetric matrices. At zero temperature, the results are in agreement with previous results, where the shock wave is observed as a discontinuity of the density of atoms. At finite temperature, the formation of shock waves is observed but with the shock fronts smoothed out. This places constraints on the experimental observation of shock-wave propagation in a noninteracting Fermi gas or strongly interacting Bose gas.